
Keyless

--[[ end positions:
-377.488007, 0.125, -48758.8672, -1, 0, 0, 0, 1, 0, 0, 0, -1
-351.308472, 2.74993896, -49045.1367, -0.866039991, 5.5283308e-06, -0.499974549, 0.499974549, 2.06232071e-05, -0.866040051, 5.5283308e-06, -0.99999994, -2.06232071e-05
]]
getgenv().deletewhendupefound = true
local localplr = game:GetService("Players").LocalPlayer
local mouse = localplr:GetMouse()
local lib = loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Lib-18698"))()
lib.makelib("Dead Rails (2AreYouMental110)")
local main = lib.maketab("Main")
local drag = lib.maketab("Dragging")
local trav = lib.maketab("Navigation")
local tools = lib.maketab("Tools")
local loopclickpart = Instance.new("Part")
loopclickpart.Anchored = true
loopclickpart.CanCollide = false
loopclickpart.Color = Color3.fromRGB(0,255,0)
loopclickpart.Shape = Enum.PartType.Ball
loopclickpart.Size = Vector3.new(2,2,2)
loopclickpart.Transparency = 1
loopclickpart.Material = Enum.Material.SmoothPlastic
loopclickpart.Parent = workspace
local loopclick = false
local tableofconnections = {}
local trainhighlight = Instance.new("Highlight")
trainhighlight.Enabled = false
trainhighlight.Adornee = workspace:FindFirstChild("Train")
trainhighlight.Parent = game.CoreGui
local uis = game:GetService("UserInputService")
local mousereq
pcall(function()
mousereq = require(game:GetService("ReplicatedStorage").Client.Controllers.MouseController)
end)
if not workspace:FindFirstChild("Train") then
coroutine.wrap(function()
trainhighlight.Adornee = workspace:WaitForChild("Train",math.huge)
end)()
end
lib.maketoggle("Toggle Cursor",main,function(bool)
uis.MouseIconEnabled = bool
end)
lib.maketoggle("Toggle Loading Screen",main,function(bool)
game:GetService("Players").LocalPlayer.PlayerGui.LoadingScreenPrefab.Enabled = bool
end)
localplr.CameraMaxZoomDistance = 99999999
localplr.CameraMode = "Classic"
uis.MouseBehavior = Enum.MouseBehavior.Default
local thirdperson = false
lib.maketoggle("Third Person",main,function(bool)
thirdperson = bool
if bool then
localplr.CameraMaxZoomDistance = 99999999
localplr.CameraMode = "Classic"
if mousereq then
mousereq.setMouseBehaviorLocked(true)
mousereq.setMouseBehavior(Enum.MouseBehavior.Default,true)
else
uis.MouseBehavior = Enum.MouseBehavior.Default
end
else
localplr.CameraMaxZoomDistance = 128
localplr.CameraMode = "LockFirstPerson"
if mousereq then
mousereq.setMouseBehavior(Enum.MouseBehavior.LockCenter,false)
else
uis.MouseBehavior = Enum.MouseBehavior.LockCenter
end
end
end,true)
table.insert(tableofconnections,uis.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.RightControl and thirdperson then
localplr.CameraMaxZoomDistance = 99999999
localplr.CameraMode = "Classic"
if mousereq then
mousereq.setMouseBehaviorLocked(true)
mousereq.setMouseBehavior(Enum.MouseBehavior.Default,true)
else
uis.MouseBehavior = Enum.MouseBehavior.Default
end
end
end))
lib.maketoggle("Select Click Position",trav,function(bool)
loopclick = bool
end)
local posgoto = nil
table.insert(tableofconnections,mouse.Button1Down:Connect(function()
if loopclick then
local hit = CFrame.new(mouse.hit.Position)
if game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
hit = hit + Vector3.new(0,game.Players.LocalPlayer.Character.HumanoidRootPart.Size.Y*1.5,0)
loopclickpart.CFrame = hit
loopclickpart.Transparency = 0
posgoto = hit
end
end
end))
local precentagetext = nil
lib.makebutton("Loop goto click position (only works for going vertically)",trav,function()
if posgoto then
local pos = posgoto
posgoto = nil
loopclickpart.Transparency = 1
local timebefore = tick()
local posdiff = (game.Players.LocalPlayer.Character:GetPivot().Position - pos.Position).Magnitude
repeat
task.wait()
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = pos
lib.updatelabel(tostring(math.round(timebefore+(posdiff/12) - tick())).." Seconds Left",precentagetext)
until tick() > timebefore+(posdiff/12) -- fastest is inf but like
end
end)
precentagetext = lib.makelabel("??? Seconds Left",trav)
lib.makelabel("",main)
lib.makebutton("Join public server (random servers)",main,function()
game:GetService("TeleportService"):Teleport(70876832253163)
end)
lib.makebutton("Server Hopper",main,function()
loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Server-Hopper-21123"))()
end)
lib.makelabel("",main)
function togglebaseplatecollision(bool)
if workspace:FindFirstChild("StartingBaseplate") then
for i,v in pairs(workspace.StartingBaseplate:GetDescendants()) do
if v:IsA("BasePart") then
v.CanCollide = bool
if bool == false and not v:FindFirstChildWhichIsA("PathfindingModifier") then
local pathfindmod = Instance.new("PathfindingModifier")
pathfindmod.PassThrough = true
pathfindmod.Parent = v
end
elseif v:IsA("PathfindingModifier") and bool == true then
v:Destroy()
end
end
end
if workspace:FindFirstChild("Baseplates") then
for i,v in pairs(workspace.Baseplates:GetDescendants()) do
if v:IsA("BasePart") then
v.CanCollide = bool
if bool == false and not v:FindFirstChildWhichIsA("PathfindingModifier") then
local pathfindmod = Instance.new("PathfindingModifier")
pathfindmod.PassThrough = true
pathfindmod.Parent = v
end
elseif v:IsA("PathfindingModifier") and bool == true then
v:Destroy()
end
end
end
end
-- haha easy copy and paste
local PathfindingService = game:GetService("PathfindingService")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local path = PathfindingService:CreatePath({})
--[[
local player = Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
]]
local waypoints
local nextWaypointIndex
local reachedConnection
local blockedConnection
local currrailroad = nil
local wcrl = false
local pathfindparts = {}
local function followPath(destination)
if wcrl == false then return end
togglebaseplatecollision(false)
-- Compute the path
local success, errorMessage = pcall(function()
path:ComputeAsync(localplr.Character.HumanoidRootPart.Position, currrailroad.Position)
end)
print(success,errorMessage,path.Status)
if wcrl and success and path.Status == Enum.PathStatus.Success then
-- Get the path waypoints
waypoints = path:GetWaypoints()
-- Detect if path becomes blocked
blockedConnection = path.Blocked:Connect(function(blockedWaypointIndex)
-- Check if the obstacle is further down the path
if wcrl and blockedWaypointIndex >= nextWaypointIndex then
-- Stop detecting path blockage until path is re-computed
blockedConnection:Disconnect()
-- Call function to re-compute new path
print("blocked")
followPath(currrailroad.Position + Vector3.new(0,3,0))
end
end)
-- Detect when movement to next waypoint is complete
if not reachedConnection then
reachedConnection = localplr.Character.Humanoid.MoveToFinished:Connect(function(reached)
local keepgoing = false
if wcrl and nextWaypointIndex < #waypoints then
keepgoing = true
else
reachedConnection:Disconnect()
blockedConnection:Disconnect()
reachedConnection = nil
blockedConnection = nil
if wcrl and nextWaypointIndex >= #waypoints then
followPath(currrailroad.Position + Vector3.new(0,3,0))
end
end
if keepgoing then
-- Increase waypoint index and move to next waypoint
nextWaypointIndex += 1
localplr.Character.Humanoid:MoveTo(waypoints[nextWaypointIndex].Position)
for i,v in pairs(pathfindparts) do
v:Destroy()
pathfindparts[i] = nil
end
for i,v in pairs(waypoints) do
if math.abs(nextWaypointIndex-i) < 50 then
local pfpart = Instance.new("Part")
pfpart.Anchored = true
pfpart.CanCollide = false
pfpart.Size = Vector3.new(1,10,1)
pfpart.Transparency = 0.95
pfpart.Color = Color3.fromRGB(255,255,0)
pfpart.CFrame = CFrame.new(v.Position+Vector3.new(0,6,0))
pfpart.CanQuery = false
pfpart.CastShadow = false
local pathfindmod = Instance.new("PathfindingModifier")
pathfindmod.PassThrough = true
pathfindmod.Parent = pfpart
pfpart.Parent = workspace
table.insert(pathfindparts,pfpart)
end
end
end
end)
end
-- Initially move to second waypoint (first waypoint is path start; skip it)
nextWaypointIndex = 2
print(waypoints[nextWaypointIndex].Position)
localplr.Character.Humanoid:MoveTo(waypoints[nextWaypointIndex].Position)
else
warn("Path not computed!", errorMessage,currrailroad)
end
end
lib.maketoggle("Follow Underground Railroad",main,function(bool)
wcrl = bool
if wcrl then
local guides = {}
for i,v in pairs(workspace.RailSegments:GetChildren()) do
if v:FindFirstChild("Guide") then
table.insert(guides,v.Guide)
end
end
local bestguide = nil
for i,v in pairs(guides) do
if bestguide == nil then
bestguide = {v,(localplr.Character:GetPivot().Position - v.Position).Magnitude}
elseif bestguide ~= nil and bestguide[2] > (localplr.Character:GetPivot().Position - v.Position).Magnitude then
bestguide = {v,(localplr.Character:GetPivot().Position - v.Position).Magnitude}
end
end
local fp = nil
if bestguide then
repeat
task.wait()
localplr.Character.Humanoid:MoveTo(bestguide[1].Position)
until ((bestguide[1].Position - Vector3.new(0,bestguide[1].Position.Y,0)) - (localplr.Character:GetPivot().Position - Vector3.new(0,localplr.Character:GetPivot().Position.Y,0))).Magnitude < 3
local tween = game:GetService("TweenService"):Create(localplr.Character.HumanoidRootPart,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0),{CFrame = (bestguide[1].CFrame+Vector3.new(0,3,0))})
togglebaseplatecollision(false)
tween:Play()
task.wait(1)
local ft = false
bestguide = nil
while wcrl do
task.wait()
togglebaseplatecollision(false)
guides = {}
for i,v in pairs(workspace.RailSegments:GetChildren()) do
if v:FindFirstChild("Guide") then
table.insert(guides,v.Guide)
end
end
for i,v in pairs(guides) do
if bestguide == nil then
bestguide = {v,(v.Position.Z + 5),(localplr.Character:GetPivot().Position - v.Position).Magnitude}
elseif bestguide ~= nil and bestguide[2] > v.Position.Z + 5 then
bestguide = {v,(v.Position.Z + 5),(localplr.Character:GetPivot().Position - v.Position).Magnitude}
end
end
if bestguide then
currrailroad = bestguide[1]
end
if ft == false then
ft = true
fp = followPath(currrailroad.Position + Vector3.new(0,3,0))
end
task.wait(1)
end
--[[while newtime > tick() do
task.wait()
localplr.Character:PivotTo(bestguide[1].CFrame + Vector3.new(0,4,0))
end]]
end
else
currrailroad = nil
togglebaseplatecollision(true)
for i,v in pairs(pathfindparts) do
v:Destroy()
end
if reachedConnection then
reachedConnection:Disconnect()
reachedConnection = nil
end
if blockedConnection then
blockedConnection:Disconnect()
blockedConnection = nil
end
end
end)
lib.makelabel("Moving will stop following the underground railroad",main)
local fpsdiv = 2 -- kinda like an fps cap but setting this higher may result in you falling in the void
local destroyheight = workspace.FallenPartsDestroyHeight
workspace.FallenPartsDestroyHeight = -50000
local dhoffset = 5
local dhto = 25
local sentnotif = false
local destroyheightnew = destroyheight + dhoffset
local localplr = game.Players.LocalPlayer
local connectsextra = {}
local charcframe = nil
local tpcframe = nil
local stopped = false
local antivoidon = true
function dochar(character)
coroutine.wrap(function()
repeat task.wait() until character:FindFirstChildWhichIsA("Humanoid")
local hum = character:FindFirstChildWhichIsA("Humanoid")
local state = hum:GetState()
table.insert(connectsextra,hum.StateChanged:Connect(function(old,new)
state = new
end))
local oldstate = nil
while hum ~= nil and hum.Parent ~= nil and not stopped do
task.wait()
if state ~= oldstate and (state ~= Enum.HumanoidStateType.Jumping and state ~= Enum.HumanoidStateType.Freefall) or (state == Enum.HumanoidStateType.Running or state == Enum.HumanoidStateType.Landed) then
tpcframe = charcframe
end
oldstate = state
end
end)()
end
local character = game.Players.LocalPlayer.Character
if getgenv().deletescript123456lol69 ~= nil then
getgenv().deletescript123456lol69()
end
local characteradded = localplr.CharacterAdded:Connect(function(character2)
character = character2
dochar(character2)
end)
dochar(character)
local startergui = game:GetService("StarterGui")
function prompt(message,yesorno,yesfunc)
pcall(function()
if yesorno ~= nil and yesfunc ~= nil then
local bindfunc = Instance.new("BindableFunction")
bindfunc.OnInvoke = function(buttonname)
if buttonname == "Yes" then
yesfunc()
sentnotif = false
end
end
startergui:SetCore("SendNotification",{
Title = "Notification",
Text = message,
Duration = 5,
Callback = bindfunc,
Button1 = "Yes",
Button2 = "No"
})
wait(5)
sentnotif = false
else
startergui:SetCore("SendNotification",{
Title = "Notification",
Text = message,
Duration = 5
})
end
end)
end
function fixchar(part)
if character then
local piv = character:GetPivot()
character:PivotTo(CFrame.new(piv.Position.X,destroyheight+dhto+character:GetExtentsSize().Y,piv.Position.Z))
end
if part then
part.Velocity = Vector3.new(0,0,0)
if character then
for i,v in pairs(character:GetChildren()) do
if v:IsA("BasePart") then
v.Velocity = Vector3.new(0,0,0)
end
end
end
end
if tpcframe ~= nil and sentnotif == false then
sentnotif = true
prompt("Teleport back to last touched (buggy)",true,function()
if character then
character:PivotTo(tpcframe)
end
if part then
part.Velocity = Vector3.new(0,0,0)
end
end)
end
end
local stepped = game:GetService("RunService").Stepped:Connect(function()
if character ~= nil and character:FindFirstChildWhichIsA("BasePart") and antivoidon then
local part = character:FindFirstChild("HumanoidRootPart") or character:FindFirstChildWhichIsA("BasePart")
local cfr = (character:FindFirstChild("HumanoidRootPart") and character.HumanoidRootPart.CFrame) or character:GetPivot()
charcframe = cfr
if cfr.Position.Y < destroyheightnew then
fixchar(part)
end
local partvel = part.Velocity
if (partvel.Y/fpsdiv) + part.Position.Y < destroyheightnew then
fixchar(part)
end
end
end)
prompt("Anti-Void Loaded!")
getgenv().deletescript123456lol69 = function()
workspace.FallenPartsDestroyHeight = destroyheight
characteradded:Disconnect()
stepped:Disconnect()
for i,v in pairs(connectsextra) do
v:Disconnect()
end
stopped = true
end
lib.maketoggle("Anti-Void",main,function(bool)
antivoidon = bool
end,true)
lib.makebutton("Attempt to Teleport to Train",main,function()
vseat = workspace.Train:FindFirstChildWhichIsA("VehicleSeat",true)
wait(5)
vseat = nil
end)
local showradius = false
lib.maketoggle("Show Attack Radius of Enemies",main,function(bool)
showradius = bool
end)
local ltpe = false
lib.maketoggle("Loop TP To End",main,function(bool)
ltpe = bool
end)
lib.makebutton("Touch Water At End (FULLY TPS YOU TO END, DISABLE LOOP TP TO END AFTER)",main,function()
local water = workspace.Baseplates.FinalBasePlate:FindFirstChild("Water")
water.CanCollide = false
local pwp = water.CFrame
water.CFrame = localplr.Character:GetPivot()
task.wait(.2)
water.CFrame = pwp
water.CanCollide = true
end)
local bankcomb = lib.makelabel("Nearest Bank Combination: ",main)
lib.maketoggle("Highlight Train",trav,function(bool)
trainhighlight.Enabled = bool
end)
local vt = false
function dvt()
if vt then
workspace.CurrentCamera.CameraSubject = workspace.Train.TrainControls
else
workspace.CurrentCamera.CameraSubject = localplr.Character.Humanoid
end
end
local wtt = false
lib.maketoggle("Walk to Train",trav,function(bool)
wtt = bool
while wtt do
pcall(function()
localplr.Character.Humanoid:MoveTo(workspace.Train:GetPivot().Position)
end)
task.wait(3)
end
end)
local ftt = false
lib.maketoggle("Flop to Train (lol)",trav,function(bool)
ftt = bool
while ftt do
pcall(function()
game:GetService("ReplicatedStorage").Shared.Remotes.RagdollFlop:FireServer(CFrame.lookAt(game.Players.LocalPlayer.Character:GetPivot().Position,workspace.Train:GetPivot().Position).LookVector)
end)
task.wait(0.3)
end
end)
local dft = lib.makelabel("Distance from Train",trav)
local dfs = lib.makelabel("Distance from Spawn",trav)
lib.maketoggle("View Train",trav,function(bool)
vt = bool
dvt()
end)
local plrtracers = false
lib.maketoggle("Make Tracers at players",trav,function(bool)
plrtracers = bool
end)
local insun = lib.makelabel("",trav)
-- i am not doing ALLAT (shame me all u want for using ChatGPT but im not doing that math)
local player = localplr
-- Ensure ScreenGui is parented to PlayerGui when it's available
local function createScreenGui()
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "LineAndLabelGui"
screenGui.Parent = game.CoreGui -- Wait until PlayerGui is available
return screenGui
end
-- Create ScreenGui
local screenGui = createScreenGui()
-- Create a container to hold the lines and labels
local lines = {}
local labels = {}
-- Function to create a line and label for each player
local function createLineAndLabelForPlayer(player)
-- Create the line
local line = Instance.new("Frame")
line.Size = UDim2.new(0, 2, 0, 2) -- Initially set a small size for the line
line.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Red line for example
line.BorderSizePixel = 0 -- Remove the border
line.AnchorPoint = Vector2.new(0.5, 1) -- Anchor the frame to its bottom center
line.Visible = false -- Initially set to invisible
line.Parent = screenGui
-- Create the label
local label = Instance.new("TextLabel")
label.Size = UDim2.new(0, 100, 0, 50)
label.Text = player.DisplayName
label.TextColor3 = Color3.fromRGB(255, 255, 255)
label.TextSize = 14 -- Initial text size
label.BackgroundTransparency = 1
label.AnchorPoint = Vector2.new(0.5, 0) -- Anchor the label to the center bottom (it'll be above the line)
label.ZIndex = 2 -- Ensure the label is on top of the line
label.TextStrokeTransparency = 0.8 -- Add a border to the text
label.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) -- Set the stroke color to black (can change this)
label.Visible = false -- Initially set to invisible
label.Parent = screenGui
-- Store the line and label for later updates
lines[player.UserId] = line
labels[player.UserId] = label
end
-- Function to update the lines and labels
local function updateLinesAndLabels()
local screenWidth = game:GetService("Workspace").CurrentCamera.ViewportSize.X
local screenHeight = game:GetService("Workspace").CurrentCamera.ViewportSize.Y
local screenCenter = Vector2.new(screenWidth / 2, screenHeight / 2)
-- Loop through all players in the game
for _, player in pairs(game.Players:GetPlayers()) do
if player == game.Players.LocalPlayer then
-- Skip the local player
continue
end
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local worldPos = player.Character.HumanoidRootPart.Position
local screenPos, onScreen = game:GetService("Workspace").CurrentCamera:WorldToScreenPoint(worldPos)
-- Convert Vector3 to Vector2
local screenPos2D = Vector2.new(screenPos.X, screenPos.Y)
-- Get the line and label for this player, create if it doesn't exist
local line = lines[player.UserId]
local label = labels[player.UserId]
if not line then
createLineAndLabelForPlayer(player)
line = lines[player.UserId]
label = labels[player.UserId]
end
-- Update the line's position and size
if onScreen and plrtracers then
-- Calculate the direction of the line
local direction = screenPos2D - screenCenter
local distance = direction.Magnitude
-- Set the size of the line (length of the line is the full distance to the player)
line.Size = UDim2.new(0, distance, 0, 2) -- Set the length based on the distance
-- Move the line halfway towards the player
local halfwayPosition = screenCenter + (direction * 0.5) -- Move halfway along the direction
line.Position = UDim2.new(0, halfwayPosition.X, 0, halfwayPosition.Y)
-- Rotate the line to point towards the player's position
local angle = math.deg(math.atan2(direction.Y, direction.X)) -- Calculate the angle in degrees
line.Rotation = angle
-- Adjust text size dynamically based on the player's distance from the camera
local camera = game:GetService("Workspace").CurrentCamera
local playerDistance = (camera.CFrame.Position - worldPos).Magnitude -- Calculate the distance from the camera to the player
-- Dynamic text size (closer players get larger text)
local textSize = math.max(10, math.min(50, 100 / playerDistance)) -- Larger text for closer players, but not exceeding 50 or below 10
label.TextSize = textSize
-- Update the label's position to be at the end of the line
local labelOffset = Vector2.new(10, 0) -- Adjust this value to move the label slightly away from the line's end
label.Position = UDim2.new(0, screenPos2D.X + labelOffset.X, 0, screenPos2D.Y + labelOffset.Y)
label.Text = player.DisplayName.." | "..tostring(math.round(playerDistance)).." Studs away" -- Update the label's text to the player's DisplayName
-- Ensure the line and label are visible when on screen
line.Visible = true
label.Visible = true
else
-- Hide the line and label if the player is off-screen
line.Visible = false
label.Visible = false
end
else
if lines[player.UserId] then
lines[player.UserId].Visible = false
end
if labels[player.UserId] then
labels[player.UserId].Visible = false
end
end
end
end
-- Cleanup when a player leaves
local opr = game.Players.PlayerRemoving:Connect(function(playerLeaving)
-- Check if the player leaving has a line and label
local line = lines[playerLeaving.UserId]
local label = labels[playerLeaving.UserId]
-- If they exist, remove them
if line then
line:Destroy()
lines[playerLeaving.UserId] = nil -- Remove from the lines table
end
if label then
label:Destroy()
labels[playerLeaving.UserId] = nil -- Remove from the labels table
end
end)
local collidedrag = false
local dragparts = {}
local playerdragparts = {}
function dodrag(v,t)
if (not v:FindFirstChildWhichIsA("Humanoid") or (v:FindFirstChildWhichIsA("Humanoid") and v:FindFirstChild("HumanoidRootPart") and (v.HumanoidRootPart.CollisionGroup == "Ragdoll" or v.HumanoidRootPart.CollisionGroup == "DraggableObject"))) then
for i2,v2 in pairs(v:GetDescendants()) do
if v2:IsA("BasePart") then
if (v2.CollisionGroup == "DraggableObject" or v2.CollisionGroup == "Ragdoll" or v2.CollisionGroup == "Player") and collidedrag then
v2.CollisionGroup = "Default"
end
table.insert(tableofconnections,v2:GetPropertyChangedSignal("CollisionGroup"):Connect(function()
if (v2.CollisionGroup == "DraggableObject" or v2.CollisionGroup == "Ragdoll" or v2.CollisionGroup == "Player") and collidedrag then
v2.CollisionGroup = "Default"
end
end))
table.insert(t or dragparts,v2)
end
end
end
end
if workspace:FindFirstChild("RuntimeItems") then
for i,v in pairs(workspace.RuntimeItems:GetChildren()) do
dodrag(v)
end
workspace.RuntimeItems.ChildAdded:Connect(dodrag)
end
-- lollllll
function raycastInFrontOfCamera_upvr() -- Line 22, Named "raycastInFrontOfCamera"
local RaycastParams_new_result1 = RaycastParams.new()
RaycastParams_new_result1.FilterType = Enum.RaycastFilterType.Exclude
RaycastParams_new_result1.FilterDescendantsInstances = {LocalPlayer_upvr.Character}
return workspace:Raycast(CurrentCamera_upvr.CFrame.Position, CurrentCamera_upvr.CFrame.LookVector * 10, RaycastParams_new_result1)
end
local killplr = nil
local dragaurap = Instance.new("Part")
dragaurap.Anchored = true
dragaurap.CanCollide = false
dragaurap.Color = Color3.fromRGB(0,255,0)
dragaurap.Shape = Enum.PartType.Ball
dragaurap.Size = Vector3.new(5,5,5)
dragaurap.Transparency = .9
dragaurap.Material = Enum.Material.SmoothPlastic
dragaurap.Parent = workspace
local dragaura = false
lib.maketoggle("Drag Nearest Humanoid",drag,function(bool)
dragaura = bool
if dragaura then
while dragaura do
task.wait(.2)
if currdrag == nil or game:GetService("ReplicatedStorage").Client.Handlers.DraggableItemHandlers.ClientDraggableObjectHandler.DraggingObject.Value ~= currdrag then
currdrag = nil
local bestthing = nil
for i,v in pairs(workspace.RuntimeItems:GetChildren()) do
if v:FindFirstChildWhichIsA("Humanoid") and localplr and v ~= localplr and localplr.Character and bestthing == nil then
bestthing = {v,(v:GetPivot().Position - localplr.Character:GetPivot().Position).Magnitude}
elseif v:FindFirstChildWhichIsA("Humanoid") and localplr and v ~= localplr and localplr.Character and v and (v:GetPivot().Position - localplr.Character:GetPivot().Position).Magnitude < bestthing[2] then
bestthing = {v,(v:GetPivot().Position - localplr.Character:GetPivot().Position).Magnitude}
end
end
game.ReplicatedStorage.Shared.Remotes.RequestStartDrag:FireServer(bestthing[1])
task.wait(1)
currdrag = bestthing[1]
end
end
else
currdrag = nil
game.ReplicatedStorage.Shared.Remotes.RequestStopDrag:FireServer()
end
end)
local killplr = false
lib.makebutton("Kill dragged part",drag,function()
killplr = currdrag
task.wait(1)
killplr = nil
end)
lib.maketoggle("Auto kill dragged part",drag,function(bool)
if bool then
killplr = ""
while killplr ~= nil do
task.wait(.2)
pcall(function()
if game:GetService("ReplicatedStorage").Client.Handlers.DraggableItemHandlers.ClientDraggableObjectHandler.DraggingObject.Value ~= nil then
currdrag = game:GetService("ReplicatedStorage").Client.Handlers.DraggableItemHandlers.ClientDraggableObjectHandler.DraggingObject.Value
end
end)
killplr = currdrag
end
else
killplr = nil
end
end)
local tpdp = false
lib.makebutton("Teleport Dragged part to Train",drag,function()
tpdp = true
task.wait(2)
tpdp = false
end)
local tpdpcu = nil
lib.makebutton("Teleport Dragged part to End",drag,function()
tpdpcu = Vector3.new(-351.308472, 2.74993896, -49045.1367)
task.wait(10)
tpdpcu = nil
end)
local tpdpc = false
lib.makebutton("Teleport Dragged part to Camera (bruteforce)",drag,function()
tpdpc = true
task.wait(2)
tpdpc = false
end)
local mdpf = false
lib.maketoggle("Make dragged part fling",drag,function(bool)
mdpf = bool
if mdpf then
pcall(function()
if game:GetService("ReplicatedStorage").Client.Handlers.DraggableItemHandlers.ClientDraggableObjectHandler.DraggingObject.Value ~= nil then
currdrag = game:GetService("ReplicatedStorage").Client.Handlers.DraggableItemHandlers.ClientDraggableObjectHandler.DraggingObject.Value
end
end)
end
end)
local atdt = false
lib.maketoggle("Attempt to drag train",drag,function(bool)
atdt = bool
while atdt do
task.wait(.6)
if game:GetService("ReplicatedStorage").Client.Handlers.DraggableItemHandlers.ClientDraggableObjectHandler.DraggingObject.Value ~= workspace.Train then
game.ReplicatedStorage.Shared.Remotes.RequestStartDrag:FireServer(workspace.Train)
end
end
end)
-- https://devforum.roblox.com/t/need-help-detecting-if-player-is-in-the-light-or-in-shadow/2168863/14
-- if dead rails uses this script for their game i can use this script for my script!
local Players = game:GetService("Players")
-- Code snipped from https://create.roblox.com/docs/reference/engine/classes/Lighting#GeographicLatitude
local Lighting = game:GetService("Lighting")
local UNIT_Z = Vector3.new(0, 0, 1)
local EARTH_TILT = math.rad(23.5) -- The Earth's tilt in radians.
local HALF_SOLAR_YEAR = 182.6282 -- Half the length of an average solar year
local function getSunDirection()
local gameTime = Lighting:GetMinutesAfterMidnight()
local geoLatitude = Lighting.GeographicLatitude
local dayTime = gameTime / 1440
local sourceAngle = 2 * math.pi * dayTime
local sunPosition = Vector3.new(math.sin(sourceAngle), -math.cos(sourceAngle), 0)
local latRad = math.rad(geoLatitude)
local sunOffset = -EARTH_TILT * math.cos(math.pi * (dayTime - HALF_SOLAR_YEAR) / HALF_SOLAR_YEAR) - latRad
local sunRotation = CFrame.fromAxisAngle(UNIT_Z:Cross(sunPosition), sunOffset)
local sunDirection = sunRotation * sunPosition
return sunDirection
end
-- Loop to detect when in shadows
local oldHeadColor = nil
function doradius(v,c)
local radthing = nil
if v.Parent.Parent:FindFirstChildWhichIsA("Humanoid") then
if not v.Parent.Parent:FindFirstChild(v.Name.."radthing") then
radthing = Instance.new("Part")
radthing.Shape = Enum.PartType.Ball
local rad = v.Value*2
radthing.Size = Vector3.new(rad,rad,rad)
radthing.Color = c or Color3.fromRGB(255,0,0)
radthing.CastShadow = false
radthing.CanCollide = false
radthing.CanQuery = false
radthing.Anchored = true
radthing.Name = v.Name.."radthing"
radthing.Transparency = 0.95
radthing.Parent = v.Parent.Parent
local otherradthing = Instance.new("Part")
otherradthing.Shape = Enum.PartType.Ball
local rad = v.Value*2 - 0.01
otherradthing.Size = Vector3.new(rad,rad,rad)
otherradthing.Color = c or Color3.fromRGB(255,0,0)
otherradthing.CastShadow = false
otherradthing.CanCollide = false
otherradthing.CanQuery = false
otherradthing.Anchored = true
otherradthing.Name = "radthing2"
otherradthing.Transparency = 0.95
otherradthing.Parent = radthing
else
radthing = v.Parent.Parent[v.Name.."radthing"]
end
if showradius and v.Parent.Parent.Humanoid.Health > 0 then
radthing.Transparency = 0.8
radthing.radthing2.Transparency = 0.8
else
radthing.Transparency = 1
radthing.radthing2.Transparency = 1
end
local fpos = (v.Parent.Parent:FindFirstChild("HumanoidRootPart") and v.Parent.Parent.HumanoidRootPart.CFrame) or v.Parent.Parent:GetPivot()
radthing.CFrame = fpos
radthing.radthing2.CFrame = CFrame.fromMatrix(fpos.Position,Vector3.new(1,1,0),Vector3.new(0,0,1),Vector3.new(0,1,0))
end
end
function doradius2(v)
if v:FindFirstChild("ChaseDistance",true) then
doradius(v:FindFirstChild("ChaseDistance",true),Color3.fromRGB(255,0,0))
end
if v:FindFirstChild("AttackDistance",true) then
doradius(v:FindFirstChild("AttackDistance",true),Color3.fromRGB(0,0,0))
end
if v:FindFirstChild("ShootDistance",true) then
doradius(v:FindFirstChild("ShootDistance",true),Color3.fromRGB(0,0,0))
end
end
local ors = game:GetService("RunService").Stepped:Connect(function()
pcall(function()
if game:GetService("ReplicatedStorage").Client.Handlers.DraggableItemHandlers.ClientDraggableObjectHandler.DraggingObject.Value ~= nil then
currdrag = game:GetService("ReplicatedStorage").Client.Handlers.DraggableItemHandlers.ClientDraggableObjectHandler.DraggingObject.Value
end
end)
if currdrag and currdrag:FindFirstChild("DragAlignPosition",true) then
if killplr then
for i,v in pairs(currdrag:GetDescendants()) do
if v:IsA("BasePart") then
v.CanCollide = false
v.CollisionGroup = "sgdhuig rfbdjg bjfd gbhrtjfd"
end
end
currdrag:FindFirstChild("DragAlignPosition",true).Position = ((currdrag:IsA("Model") and currdrag:GetPivot().Position) or (currdrag:IsA("BasePart") and currdrag.Position)) + Vector3.new(0,-20000,0)
end
if tpdp then
if currdrag:IsA("BasePart") then
currdrag.CFrame = workspace.Train:GetPivot()
else
currdrag:PivotTo(workspace.Train:GetPivot())
end
currdrag:FindFirstChild("DragAlignPosition",true).Position = workspace.Train:GetPivot().Position
end
if tpdpc then
local posit = workspace.CurrentCamera.CFrame + workspace.CurrentCamera.CFrame.LookVector * 10
if currdrag:IsA("BasePart") then
currdrag.CFrame = posit
else
currdrag:PivotTo(posit)
end
currdrag:FindFirstChild("DragAlignPosition",true).Position = posit.Position
end
if mdpf then
local posit = workspace.CurrentCamera.CFrame + workspace.CurrentCamera.CFrame.LookVector * 10
if currdrag:IsA("BasePart") then
currdrag.Velocity = Vector3.new(99999,99999,99999)
currdrag.CFrame = posit
else
for i,v in pairs(currdrag:GetDescendants()) do
if v:IsA("BasePart") then
v.Velocity = Vector3.new(99999,99999,99999)
end
end
currdrag:PivotTo(posit)
end
end
if tpdpcu then
if currdrag:IsA("BasePart") then
currdrag.CFrame = CFrame.new(tpdpcu)
else
currdrag:PivotTo(CFrame.new(tpdpcu))
end
currdrag:FindFirstChild("DragAlignPosition",true).Position = tpdpcu
end
elseif currdrag and not currdrag:FindFirstChild("DragAlignPosition",true) then
currdrag = nil
end
if vseat then
localplr.Character:PivotTo(vseat.CFrame+Vector3.new(0,2,0))
vseat:Sit(localplr.Character.Humanoid)
end
dvt()
updateLinesAndLabels()
--if showradius then
if workspace:FindFirstChild("RuntimeItems") then
for i,v in pairs(workspace.RuntimeItems:GetChildren()) do
doradius2(v)
end
end
if workspace:FindFirstChild("NightEnemies") then
for i,v in pairs(workspace.NightEnemies:GetChildren()) do
doradius2(v)
end
end
if workspace:FindFirstChild("RandomBuildings") then
for i,v in pairs(workspace.RandomBuildings:GetChildren()) do
if v:FindFirstChild("StandaloneZombiePart") and v.StandaloneZombiePart:FindFirstChild("Zombies") then
for i,v in pairs(v.StandaloneZombiePart.Zombies:GetChildren()) do
doradius2(v)
end
end
end
end
if workspace:FindFirstChild("Towns") then
for i,v in pairs(workspace.Towns:GetChildren()) do
if not v:FindFirstChild("ZombiePart") or not v.ZombiePart:FindFirstChild("Zombies") then continue end
for i,v in pairs(v.ZombiePart.Zombies:GetChildren()) do
doradius2(v)
end
end
end
if workspace:FindFirstChild("Baseplates") then
for i,v in pairs(workspace.Baseplates:GetChildren()) do
for i,v in pairs(v:GetChildren()) do
if v:FindFirstChild("Animals") then
for i,v in pairs(v.Animals:GetChildren()) do
if string.find(v.Name:lower(),"outlaw") and v:FindFirstChild("ChaseDistance",true) then
doradius2(v)
elseif v.Name == "Werewolf" or v.Name == "Wolf" then
doradius2(v)
end
end
elseif v:FindFirstChild("StandaloneZombiePart") then
for i,v in pairs(v.StandaloneZombiePart.Zombies:GetChildren()) do
doradius2(v)
end
end
end
end
end
local character = localplr.Character
if character and character:FindFirstChild("Head") then
local hit = workspace:Raycast(character.Head.CFrame.Position, getSunDirection() * 1000)
if hit then
lib.updatelabel("\u{1F311}",insun)
elseif not hit then
lib.updatelabel("\u{1F305}",insun)
end
end
local nb = nil
if workspace:FindFirstChild("Towns") then
for i,v in pairs(workspace.Towns:GetChildren()) do
if not v:FindFirstChild("Buildings") then continue end
local closestbank = nil
for i,v in pairs(v.Buildings:GetChildren()) do
if v.Name == "BankDestroyed" or v.Name == "Bank" and v:FindFirstChild("Combination",true) then
if closestbank == nil and v:FindFirstChild("Combination",true) then
closestbank = {v:FindFirstChild("Combination",true).Value,(v:GetPivot().Position - localplr.Character:GetPivot().Position).Magnitude}
elseif v:FindFirstChild("Combination",true) and closestbank[2] > (v:GetPivot().Position - localplr.Character:GetPivot().Position).Magnitude then
closestbank = {v:FindFirstChild("Combination",true).Value,(v:GetPivot().Position - localplr.Character:GetPivot().Position).Magnitude}
end
end
end
nb = closestbank[1]
end
end
if nb ~= nil then
lib.updatelabel("Nearest Bank Combination: "..tostring(nb),bankcomb)
else
lib.updatelabel("No Bank Found",bankcomb)
end
if ltpe then
localplr.Character:PivotTo(CFrame.new(-351.308472, 2.74993896, -49045.1367))
pcall(function()
workspace.Baseplates.FinalBasePlate.OutlawBase.Bridge.BridgeControl.Crank.Model.Mid.EndGame.HoldDuration = 0
fireproximityprompt(workspace.Baseplates.FinalBasePlate.OutlawBase.Bridge.BridgeControl.Crank.Model.Mid.EndGame,0)
end)
end
end)
lib.maketoggle("Make dragged parts clipped/collide",drag,function(bool)
collidedrag = bool
if collidedrag then
for i,v in pairs(dragparts) do
if v and (v.CollisionGroup == "DraggableObject" or v.CollisionGroup == "Ragdoll") then
v.CollisionGroup = "Default"
end
end
end
end)
local spams = {}
local spamsrev = {}
function makespam(sname,boolname)
spams[boolname] = false
spamsrev[sname] = true
lib.maketoggle("Spam "..sname.."s",tools,function(bool)
spams[boolname] = bool
if spams[boolname] then
while spams[boolname] do
task.wait(.1)
pcall(function()
for i,v in pairs(localplr.Backpack:GetChildren()) do
if v.Name == sname then
v.Parent = localplr.Character
end
end
for i,v in pairs(localplr.Character:GetChildren()) do
if v.Name == sname then
v:Activate()
end
end
end)
end
end
end)
end
local sa = false
lib.maketoggle("Spam All",tools,function(bool)
sa = bool
if sa then
while sa do
task.wait(.1)
pcall(function()
for i,v in pairs(localplr.Backpack:GetChildren()) do
if spamsrev[v.Name] == true then
v.Parent = localplr.Character
end
end
for i,v in pairs(localplr.Character:GetChildren()) do
if spamsrev[v.Name] == true then
v:Activate()
end
end
end)
end
end
end)
makespam("Shovel","ss")
makespam("Pickaxe","spa")
makespam("Cavalry Sword","scs")
makespam("Tomahawk","sth")
makespam("Vampire Knife","svk")
lib.makebutton("Enable Inventory",tools,function()
require(game:GetService("ReplicatedStorage").Packages.Satchel):SetBackpackEnabled(true)
end)
--game:GetService("ReplicatedStorage").Shared.Remotes.EatCorpse
local on = true
coroutine.wrap(function()
while on do
task.wait(.1)
pcall(function()
lib.updatelabel("Distance from Train: "..tostring(math.round((localplr.Character:GetPivot().Position - workspace.Train:GetPivot().Position).Magnitude)),dft)
if workspace:FindFirstChild("StartingZone") then
lib.updatelabel("Distance from Spawn: "..tostring(math.round((localplr.Character:GetPivot().Position - workspace.StartingZone:GetPivot().Position).Magnitude)),dfs)
else
lib.updatelabel("Distance from Spawn: "..tostring(math.round((localplr.Character:GetPivot().Position - Vector3.new(56.1720314, 6.97477531, 29898.3301)).Magnitude)),dfs)
end
end)
end
end)()
lib.ondestroyedfunc = function()
on = false
localplr.CameraMaxZoomDistance = 128
localplr.CameraMode = "LockFirstPerson"
uis.MouseBehavior = Enum.MouseBehavior.LockCenter
uis.MouseIconEnabled = false
if mousereq then
mousereq.setMouseBehaviorLocked(true)
end
for i,v in pairs(tableofconnections) do
v:Disconnect()
end
trainhighlight:Destroy()
loopclickpart:Destroy()
wtt = false
ftt = false
for i,v in pairs(spams) do
v = false
end
sa = false
atdt = false
tpdp = false
tpdpc = false
wcrl = false
for i,v in pairs(pathfindparts) do
v:Destroy()
end
if reachedConnection then
reachedConnection:Disconnect()
end
reachedConnection = nil
if blockedConnection then
blockedConnection:Disconnect()
end
blockedConnection = nil
togglebaseplatecollision(true)
currdrag = nil
dragaura = false
killplr = false
antivoidon = false
vseat = nil
vt = false
dvt()
plrtracers = false
opr:Disconnect()
ors:Disconnect()
showradius = false
for i,v in pairs(workspace.RuntimeItems:GetChildren()) do
if v:FindFirstChild("ChaseDistance",true) then
doradius(v:FindFirstChild("ChaseDistance",true))
end
end
for i,v in pairs(workspace.Towns:GetChildren()) do
if not v:FindFirstChild("ZombiePart") or not v.ZombiePart:FindFirstChild("Zombies") then continue end
for i,v in pairs(v.ZombiePart.Zombies:GetChildren()) do
if v:FindFirstChild("ChaseDistance",true) then
doradius(v:FindFirstChild("ChaseDistance",true))
end
end
end
ltpe = false
endNo comments yet for this script.


![[KEYLESS] Moondiety Script | 17+ supported Games](https://scriptblox.com/images/sb/0-1753093706828.png)
