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