Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local userInputService = game:GetService("UserInputService")
- local character = script.Parent
- local humanoid = character:WaitForChild("Humanoid")
- local debounce = false
- userInputService.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed then return end
- -- Exit if chatting or typing in a TextBox
- if input.KeyCode == Enum.KeyCode.F and humanoid.Health > 0 then
- if not debounce then
- debounce = true
- print("Activate Invisiblity")
- game.ReplicatedStorage.InvisibleAbility:InvokeServer()
- debounce = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement