daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest May 16th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local player = game.Players.LocalPlayer
  2. local mouse = player:GetMouse()
  3. local enabled = false
  4.  
  5. local Body = Instance.new("BodyPosition")
  6. Body.MaxForce = Vector3.new(15000, 15000, 15000)
  7. Body.Parent = nil
  8.  
  9. mouse.Button1Down:connect(function()
  10.     if mouse.Target ~= nil and Enabled == true then
  11.     Body.Parent = player.Character.HumanoidRootPart
  12.     Body.Position = Vector3.new(mouse.Hit.X, mouse.Hit.Y + 5, mouse.Hit.Z)
  13.     end
  14. end)
  15.  
  16. mouse.KeyDown:connect(function(key)
  17.     if key == "w" then
  18.     Body.Parent = nil
  19.     elseif key == "s" then
  20.         Body.Parent = nil
  21.     elseif key == "a" then
  22.         Body.Parent = nil
  23.     elseif key == "d" then
  24.         Body.Parent = nil
  25.     end
  26. end)
  27.  
  28. mouse.KeyDown:connect(function(key)
  29.     if key == "q" then
  30.         if Enabled == false then
  31.             Enabled = true
  32.         else
  33.             Enabled = false
  34.         end
  35.     end
  36. end)
RAW Paste Data
Top