Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserInputService = game:GetService("UserInputService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local RunService = game:GetService("RunService")
- local Workspace = game:GetService("Workspace")
- local Players = game:GetService("Players")
- local debounce = true
- -- constants
- local PLAYER = Players.LocalPlayer
- local CAMERA = Workspace.CurrentCamera
- local EVENTS = ReplicatedStorage:WaitForChild("Events")
- local IGNORE = Workspace:WaitForChild("Ignore")
- local CHARACTERS = Workspace:WaitForChild("Characters")
- local CHARACTER = CHARACTERS:WaitForChild(PLAYER.Name)
- local FORCE = CHARACTER:WaitForChild("VectorForce")
- UserInputService.InputBegan:connect(function(inputObject, processed)
- if not processed then
- if inputObject.KeyCode == Enum.KeyCode.E then
- if debounce == true then
- EVENTS.Trick:Fire(CHARACTER, "Spin")
- debounce = false
- EVENTS.XP:FireServer()
- wait(1)
- debounce = true
- end
- elseif inputObject.KeyCode == Enum.KeyCode.Q then
- if debounce == true then
- EVENTS.Trick:Fire(CHARACTER, "Fly")
- debounce = false
- EVENTS.XP:FireServer()
- wait(3)
- debounce = true
- end
- elseif inputObject.KeyCode == Enum.KeyCode.R then
- if debounce == true then
- EVENTS.Trick:Fire(CHARACTER, "Wheelie")
- debounce = false
- EVENTS.XP:FireServer()
- wait(2)
- debounce = true
- end
- elseif inputObject.KeyCode == Enum.KeyCode.K then
- if debounce == true then
- EVENTS.Trick:Fire(CHARACTER, "Spin2")
- debounce = false
- EVENTS.XP:FireServer()
- wait(1)
- debounce = true
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment