Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rp = game:GetService("ReplicatedStorage")
- local Sword = rp:WaitForChild("Sword")
- local UIS = game:GetService("UserInputService")
- local isEquipped = false
- local debounce = false
- local cd = 1
- UIS.InputBegan:Connect(function(input,isTyping)
- if not isTyping then
- if input.KeyCode == Enum.KeyCode.E then
- if not isEquipped then
- isEquipped = true
- Sword:FireServer(isEquipped)
- elseif isEquipped and not debounce then
- debounce = true
- isEquipped = false
- Sword:FireServer(isEquipped)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement