Advertisement
MisterH_t

powerScript | LocalScript

Aug 11th, 2022
3,212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1. Qualquer problema me contacte no Discord mistr#2399, DMs abertas.
  2. ------------------------------------------------------------------
  3.  
  4. local uis = game:GetService("UserInputService")
  5. local plr = game.Players.LocalPlayer
  6.  
  7. local mouse = plr:GetMouse()
  8.  
  9. local event = game:WaitForChild("ReplicatedStorage").powerEvent
  10.  
  11. local char = plr.Character
  12. local hum = char:WaitForChild("Humanoid")
  13.  
  14. local key = Enum.KeyCode.**TECLA DO PODER**
  15.  
  16. local db = false
  17.  
  18. local animTrack = hum:LoadAnimation(script:WaitForChild("powerAnimation")
  19.  
  20. --opcional
  21. local sound = script.powerSound
  22. --opcional
  23.  
  24. uis.InputBegan:connect(function(input)
  25.     if input.KeyCode == key then
  26.         if not db then
  27.             db = true
  28.             animTrack:Play()
  29.             wait(.2)
  30.             event:FireServer(mouse.Hit.Position)
  31.         elseif db then
  32.             warn(plr.Name..", please wait until debounce is false")
  33.         end
  34.     end
  35. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement