Advertisement
justneed

Climb in air keybind script

Dec 5th, 2024 (edited)
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | Gaming | 0 0
  1. local plr     = game:GetService("Players").LocalPlayer
  2. local hum     = plr.Character.Humanoid
  3. local hrp     = plr.Character.HumanoidRootPart
  4. hum.JumpPower = 50
  5.  
  6. local function y()
  7.     local fun            = Instance.new("TrussPart")
  8.     fun.Parent           = game.Workspace
  9.     fun.Name             = "fun"
  10.     fun.Size             = Vector3.new(2,6,2)
  11.     fun.CollisionGroupId = 1
  12.     hrp.CollisionGroupId = 3
  13.     fun.Transparency     = 1
  14.  
  15.     fun.CanCollide = true
  16.     fun.CanTouch   = true
  17.     local con
  18.  
  19.     con        = game:GetService("RunService").RenderStepped:Connect(function()
  20.     fun.CFrame = hrp.CFrame + hrp.CFrame.LookVector * 1.5
  21.     end)
  22. end
  23.  
  24. local function n()
  25.     game.Workspace.fun:Destroy()
  26. end
  27.  
  28. game:GetService("UserInputService").InputBegan:Connect(function(i, g)
  29.     if i.KeyCode == Enum.KeyCode.E and not g then
  30.         y()
  31.     elseif i.KeyCode == Enum.KeyCode.R and not g then
  32.         n()
  33.     end
  34. end)
  35.  
  36. local function respawn(character)
  37.     hum           = character:WaitForChild("Humanoid")
  38.     hrp           = character:WaitForChild("HumanoidRootPart")
  39.     hum.JumpPower = 50
  40. end
  41.  
  42. plr.CharacterAdded:Connect(respawn)
  43. if plr.Character then
  44.     respawn(plr.Character)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement