Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
- local Window = Rayfield:CreateWindow({
- Name = "Dead Rails Hub",
- LoadingTitle = "Loading Dead Rails...",
- LoadingSubtitle = "Lucky 28]",
- ConfigurationSaving = {
- Enabled = false,
- FolderName = nil,
- FileName = "DeadRailsConfig"
- }
- })
- local Tab = Window:CreateTab("Main")
- local autoSwingEnabled = false
- local swingSpeed = 0.01 -- Default speed in seconds (adjustable)
- local autoShovelEnabled = false
- local autoExcaliburEnabled = false
- local enlargeEnabled = false
- local hitboxSize = 10
- local connections = {}
- local flySpeed = 50 -- Default fly speed in studs per second (adjustable)
- local flyEnabled = false
- local flyBV = nil
- local flyBG = nil
- local flyKeys = {w = false, s = false, a = false, d = false, space = false, ctrl = false}
- local flyInputConnections = {}
- local function isZombie(obj)
- return obj:IsA("Model") and obj:FindFirstChild("Humanoid") and obj:FindFirstChild("HumanoidRootPart") and string.find(obj.Name:lower(), "zombie")
- end
- local function enableFly()
- if flyEnabled then return end
- flyEnabled = true
- local player = game:GetService("Players").LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local root = character:WaitForChild("HumanoidRootPart")
- humanoid:ChangeState(Enum.HumanoidStateType.Physics)
- flyBV = Instance.new("BodyVelocity")
- flyBV.Velocity = Vector3.new(0, 0, 0)
- flyBV.MaxForce = Vector3.new(9e9, 9e9, 9e9)
- flyBV.Parent = root
- flyBG = Instance.new("BodyGyro")
- flyBG.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
- flyBG.P = 9e4
- flyBG.Parent = root
- local UIS = game:GetService("UserInputService")
- local inputBegan = UIS.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- local key = input.KeyCode
- if key == Enum.KeyCode.W then flyKeys.w = true
- elseif key == Enum.KeyCode.S then flyKeys.s = true
- elseif key == Enum.KeyCode.A then flyKeys.a = true
- elseif key == Enum.KeyCode.D then flyKeys.d = true
- elseif key == Enum.KeyCode.Space then flyKeys.space = true
- elseif key == Enum.KeyCode.LeftControl then flyKeys.ctrl = true
- end
- end
- end)
- local inputEnded = UIS.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- local key = input.KeyCode
- if key == Enum.KeyCode.W then flyKeys.w = false
- elseif key == Enum.KeyCode.S then flyKeys.s = false
- elseif key == Enum.KeyCode.A then flyKeys.a = false
- elseif key == Enum.KeyCode.D then flyKeys.d = false
- elseif key == Enum.KeyCode.Space then flyKeys.space = false
- elseif key == Enum.KeyCode.LeftControl then flyKeys.ctrl = false
- end
- end
- end)
- local renderStepped = game:GetService("RunService").RenderStepped:Connect(function()
- if not flyEnabled then return end
- local cam = workspace.CurrentCamera
- local move = Vector3.new(0, 0, 0)
- if flyKeys.w then move = move + cam.CFrame.LookVector end
- if flyKeys.s then move = move - cam.CFrame.LookVector end
- if flyKeys.a then move = move - cam.CFrame.RightVector end
- if flyKeys.d then move = move + cam.CFrame.RightVector end
- if flyKeys.space then move = move + Vector3.new(0, 1, 0) end
- if flyKeys.ctrl then move = move - Vector3.new(0, 1, 0) end
- if move.Magnitude > 0 then
- move = move.Unit
- flyBV.Velocity = move * flySpeed
- else
- flyBV.Velocity = Vector3.new(0, 0, 0)
- end
- flyBG.CFrame = cam.CFrame
- end)
- table.insert(flyInputConnections, inputBegan)
- table.insert(flyInputConnections, inputEnded)
- table.insert(flyInputConnections, renderStepped)
- end
- local function disableFly()
- if not flyEnabled then return end
- flyEnabled = false
- local player = game:GetService("Players").LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
- if flyBV then flyBV:Destroy() flyBV = nil end
- if flyBG then flyBG:Destroy() flyBG = nil end
- for _, conn in ipairs(flyInputConnections) do
- conn:Disconnect()
- end
- flyInputConnections = {}
- end
- local Toggle = Tab:CreateToggle({
- Name = "Auto Swing Melee",
- CurrentValue = false,
- Flag = "AutoSwingToggle",
- Callback = function(Value)
- autoSwingEnabled = Value
- if autoSwingEnabled then
- spawn(function()
- while autoSwingEnabled do
- local args = {
- game:GetService("Players").LocalPlayer.Character:WaitForChild("Vampire Knife"),
- os.clock() * 1000, -- Using current time as approximation; adjust if needed
- Vector3.new(0.38748157024383545, -0.469262033700943, 0.7935056090354919)
- }
- game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
- wait(swingSpeed)
- end
- end)
- end
- end,
- })
- local Slider = Tab:CreateSlider({
- Name = "Swing Speed (seconds)",
- Range = {0.01, 1.0},
- Increment = 0.01,
- Suffix = "s",
- CurrentValue = 0.01,
- Flag = "SwingSpeedSlider",
- Callback = function(Value)
- swingSpeed = Value
- end,
- })
- local ShovelToggle = Tab:CreateToggle({
- Name = "Auto Shovel",
- CurrentValue = false,
- Flag = "AutoShovelToggle",
- Callback = function(Value)
- autoShovelEnabled = Value
- if autoShovelEnabled then
- spawn(function()
- while autoShovelEnabled do
- local args = {
- game:GetService("Players").LocalPlayer.Character:WaitForChild("Shovel"),
- 1768150910.657773,
- Vector3.new(-0.8638443350791931, -0.3981878459453583, -0.3085765242576599)
- }
- game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
- task.wait(0.01)
- end
- end)
- spawn(function()
- while autoShovelEnabled do
- local args = {
- game:GetService("Players").LocalPlayer.Character:WaitForChild("Shovel"),
- 1768150909.257726
- }
- game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("ChargeMelee"):FireServer(unpack(args))
- task.wait(0.01)
- end
- end)
- end
- end,
- })
- local ExcaliburToggle = Tab:CreateToggle({
- Name = "Auto Excalibur",
- CurrentValue = false,
- Flag = "AutoExcaliburToggle",
- Callback = function(Value)
- autoExcaliburEnabled = Value
- if autoExcaliburEnabled then
- spawn(function()
- while autoExcaliburEnabled do
- local args = {
- game:GetService("Players").LocalPlayer.Character:WaitForChild("Excalibur"),
- 1768326712.974426
- }
- game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("ChargeMelee"):FireServer(unpack(args))
- task.wait(0.01)
- end
- end)
- spawn(function()
- while autoExcaliburEnabled do
- local args = {
- game:GetService("Players").LocalPlayer.Character:WaitForChild("Excalibur"),
- 1768326713.962643,
- Vector3.new(0.6278625130653381, -0.5555389523506165, 0.5451285243034363)
- }
- game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
- task.wait(0.01)
- end
- end)
- end
- end,
- })
- local FlySpeedSlider = Tab:CreateSlider({
- Name = "Fly Speed",
- Range = {10, 200},
- Increment = 10,
- Suffix = "studs/s",
- CurrentValue = 50,
- Flag = "FlySpeedSlider",
- Callback = function(Value)
- flySpeed = Value
- end,
- })
- local function goToSeat(trainName, notifyTitle, notifyContent)
- local player = game:GetService("Players").LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local root = character:WaitForChild("HumanoidRootPart")
- local train = workspace:FindFirstChild(trainName)
- if train then
- local seatPath = train:WaitForChild("RequiredComponents"):WaitForChild("Controls"):WaitForChild("ConductorSeat"):WaitForChild("VehicleSeat")
- root.CFrame = seatPath.CFrame + Vector3.new(0, 3, 0)
- wait(0.1)
- humanoid:Sit(seatPath)
- else
- Rayfield:Notify({
- Title = notifyTitle,
- Content = notifyContent,
- Duration = 5,
- Image = 4483362458
- })
- enableFly()
- spawn(function()
- while true do
- train = workspace:FindFirstChild(trainName)
- if train then
- local seatPath = train:WaitForChild("RequiredComponents"):WaitForChild("Controls"):WaitForChild("ConductorSeat"):WaitForChild("VehicleSeat")
- disableFly()
- root.CFrame = seatPath.CFrame + Vector3.new(0, 3, 0)
- wait(0.1)
- humanoid:Sit(seatPath)
- break
- end
- task.wait(1)
- end
- end)
- end
- end
- local Button = Tab:CreateButton({
- Name = "Go to Presidential Conductor Seat",
- Callback = function()
- goToSeat("presidential", "Train Not Found", "Enabling manual fly. Will auto-sit when presidential train appears.")
- end,
- })
- local DefaultButton = Tab:CreateButton({
- Name = "Go to Default Train Conductor Seat",
- Callback = function()
- goToSeat("default", "Train Not Found", "Enabling manual fly. Will auto-sit when default train appears.")
- end,
- })
- local GhostButton = Tab:CreateButton({
- Name = "Go to Ghost Train Conductor Seat",
- Callback = function()
- goToSeat("ghost", "Train Not Found", "Enabling manual fly. Will auto-sit when ghost train appears.")
- end,
- })
- local SliderHitbox = Tab:CreateSlider({
- Name = "Hitbox Size",
- Range = {1, 50},
- Increment = 1,
- Suffix = "studs",
- CurrentValue = 10,
- Flag = "HitboxSizeSlider",
- Callback = function(Value)
- hitboxSize = Value
- end,
- })
- local ToggleEnlarge = Tab:CreateToggle({
- Name = "Enlarge Zombie Hitboxes",
- CurrentValue = false,
- Flag = "EnlargeHitboxToggle",
- Callback = function(Value)
- enlargeEnabled = Value
- if enlargeEnabled then
- for _, obj in ipairs(workspace:GetChildren()) do
- if isZombie(obj) then
- obj.HumanoidRootPart.Size = Vector3.new(hitboxSize, hitboxSize, hitboxSize / 2)
- obj.HumanoidRootPart.Transparency = 0.5
- end
- end
- local conn = workspace.ChildAdded:Connect(function(child)
- if enlargeEnabled and isZombie(child) then
- task.wait(0.1)
- if child:FindFirstChild("HumanoidRootPart") then
- child.HumanoidRootPart.Size = Vector3.new(hitboxSize, hitboxSize, hitboxSize / 2)
- child.HumanoidRootPart.Transparency = 0.5
- end
- end
- end)
- table.insert(connections, conn)
- else
- for _, obj in ipairs(workspace:GetChildren()) do
- if isZombie(obj) then
- obj.HumanoidRootPart.Size = Vector3.new(2, 2, 1)
- obj.HumanoidRootPart.Transparency = 0
- end
- end
- for _, conn in ipairs(connections) do
- conn:Disconnect()
- end
- connections = {}
- end
- end,
- })
- -- Vampire knife charge loop (always on)
- while task.wait(0.01) do
- local args = {
- game:GetService("Players").LocalPlayer.Character:WaitForChild("Vampire Knife"),
- 1768151606.210378
- }
- game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("ChargeMelee"):FireServer(unpack(args))
- end
Advertisement
Add Comment
Please, Sign In to add comment