DrawingJhon

Not fall

Aug 19th, 2020 (edited)
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1. local plr = game:GetService("Players").LocalPlayer
  2. local function moveP(h)
  3.     local rNum1 = math.random(-50, 50)
  4.     local rNum2 = math.random(-50, 50)
  5.     local lastR = h.Rotation
  6.     h.CFrame = CFrame.new(rNum1, 5, rNum2) * CFrame.Angles(math.rad(lastR.X), math.rad(lastR.Y), math.rad(lastR.Z))
  7.     local body = Instance.new("BodyPosition",h)
  8.     body.Position = Vector3.new(rNum1, 5, rNum2)
  9.     body.MaxForce = Vector3.new(0, math.huge, 0)
  10.     wait(1)
  11.     body:Destroy()
  12. end
  13. while true do
  14.     if plr.Character then
  15.         if plr.Character:findFirstChild("HumanoidRootPart") then
  16.             local hum = plr.Character:findFirstChild("HumanoidRootPart")
  17.             if hum.Position.Y < -200 then
  18.                 moveP(hum)
  19.             end
  20.         elseif plr.Character:findFirstChildOfClass("Humanoid") then
  21.             local hum = plr.Character:findFirstChildOfClass("Humanoid")
  22.             if hum.Torso ~= nil then
  23.                 if hum.Torso.Position.Y < -200 then
  24.                     moveP(hum.Torso)
  25.                 end
  26.             end
  27.         end
  28.     end
  29.     wait()
  30. end
Add Comment
Please, Sign In to add comment