Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game:GetService("Players").LocalPlayer
- local hum = plr.Character.Humanoid
- local hrp = plr.Character.HumanoidRootPart
- hum.JumpPower = 50
- local function y()
- local fun = Instance.new("TrussPart")
- fun.Parent = game.Workspace
- fun.Name = "fun"
- fun.Size = Vector3.new(2,6,2)
- fun.CollisionGroupId = 1
- hrp.CollisionGroupId = 3
- fun.Transparency = 1
- fun.CanCollide = true
- fun.CanTouch = true
- local con
- con = game:GetService("RunService").RenderStepped:Connect(function()
- fun.CFrame = hrp.CFrame + hrp.CFrame.LookVector * 1.5
- end)
- end
- local function n()
- game.Workspace.fun:Destroy()
- end
- game:GetService("UserInputService").InputBegan:Connect(function(i, g)
- if i.KeyCode == Enum.KeyCode.E and not g then
- y()
- elseif i.KeyCode == Enum.KeyCode.R and not g then
- n()
- end
- end)
- local function respawn(character)
- hum = character:WaitForChild("Humanoid")
- hrp = character:WaitForChild("HumanoidRootPart")
- hum.JumpPower = 50
- end
- plr.CharacterAdded:Connect(respawn)
- if plr.Character then
- respawn(plr.Character)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement