Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uis = game:GetService("UserInputService")
- player = script.Parent.Parent
- character = player.Character
- uis.InputBegan:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.W then
- if player.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
- local bv = player.Character.HumanoidRootPart.BodyVelocity
- bv.Parent = player.Character.HumanoidRootPart
- player.Character.HumanoidRootPart.Anchored = false
- repeat
- bv.P = Vector3.new(1000,1000,1000)
- bv.Velocity = game.Workspace.Camera.CFrame.LookVector*100
- wait()
- until player.Character.HumanoidRootPart.Anchored == true
- else
- local bv = Instance.new("BodyVelocity")
- bv.Parent = player.Character.HumanoidRootPart
- player.Character.HumanoidRootPart.Anchored = false
- repeat
- bv.P = Vector3.new(1000,1000,1000)
- bv.Velocity = game.Workspace.Camera.CFrame.LookVector*100
- wait()
- until player.Character.HumanoidRootPart.Anchored == true
- end
- end
- end)
- uis.InputEnded:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.W then
- local bv = game.Players.LocalPlayer.Character.HumanoidRootPart
- if bv:FindFirstChild("BodyVelocity") then
- player.Character.HumanoidRootPart.Anchored = true
- else
- print("No")
- end
- end
- end)
- uis.InputBegan:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.X then
- local bv = game.Players.LocalPlayer.Character.HumanoidRootPart.BodyVelocity
- if game.Players.LocalPlayer.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
- bv:Destroy()
- end
- else print("No")
- end
- end)
- uis.InputBegan:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.S then
- if player.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
- local bv = player.Character.HumanoidRootPart.BodyVelocity
- bv.Parent = player.Character.HumanoidRootPart
- player.Character.HumanoidRootPart.Anchored = false
- repeat
- bv.P = Vector3.new(1000,1000,1000)
- bv.Velocity = player.Character.HumanoidRootPart.CFrame.LookVector*100
- wait()
- until player.Character.HumanoidRootPart.Anchored == true
- end
- else print("Hi")
- end
- end)
- uis.InputEnded:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.S then
- local bv = game.Players.LocalPlayer.Character.HumanoidRootPart
- if bv:FindFirstChild("BodyVelocity") then
- player.Character.HumanoidRootPart.Anchored = true
- else
- print("No")
- end
- end
- end)
- uis.InputBegan:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.D then
- if player.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
- local bv = player.Character.HumanoidRootPart.BodyVelocity
- bv.Parent = player.Character.HumanoidRootPart
- player.Character.HumanoidRootPart.Anchored = false
- repeat
- bv.P = Vector3.new(1000,1000,1000)
- bv.Velocity = player.Character.HumanoidRootPart.CFrame.lookVector*100
- wait()
- until player.Character.HumanoidRootPart.Anchored == true
- end
- else print("Hi")
- end
- end)
- uis.InputEnded:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.D then
- local bv = game.Players.LocalPlayer.Character.HumanoidRootPart
- if bv:FindFirstChild("BodyVelocity") then
- player.Character.HumanoidRootPart.Anchored = true
- else
- print("No")
- end
- end
- end)
- uis.InputBegan:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.A then
- if player.Character.HumanoidRootPart:FindFirstChild("BodyVelocity") then
- local bv = player.Character.HumanoidRootPart.BodyVelocity
- bv.Parent = player.Character.HumanoidRootPart
- player.Character.HumanoidRootPart.Anchored = false
- repeat
- bv.P = Vector3.new(1000,1000,1000)
- bv.Velocity = player.Character.HumanoidRootPart.CFrame.lookVector*100
- wait()
- until player.Character.HumanoidRootPart.Anchored == true
- end
- else print("Hi")
- end
- end)
- uis.InputEnded:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.A then
- local bv = game.Players.LocalPlayer.Character.HumanoidRootPart
- if bv:FindFirstChild("BodyVelocity") then
- player.Character.HumanoidRootPart.Anchored = true
- else
- print("No")
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement