Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local enabled = false
- local Body = Instance.new("BodyPosition")
- Body.MaxForce = Vector3.new(15000, 15000, 15000)
- Body.Parent = nil
- mouse.Button1Down:connect(function()
- if mouse.Target ~= nil and Enabled == true then
- Body.Parent = player.Character.HumanoidRootPart
- Body.Position = Vector3.new(mouse.Hit.X, mouse.Hit.Y + 5, mouse.Hit.Z)
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "w" then
- Body.Parent = nil
- elseif key == "s" then
- Body.Parent = nil
- elseif key == "a" then
- Body.Parent = nil
- elseif key == "d" then
- Body.Parent = nil
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "q" then
- if Enabled == false then
- Enabled = true
- else
- Enabled = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement