Advertisement
BoblokDevelopyyyr

ClientHandler

Jun 7th, 2025
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. local UIS = game:GetService("UserInputService")
  2. local RS = game:GetService("ReplicatedStorage")
  3. local events = RS.Events
  4. local playAnimationEvent = events.PlayAnimation
  5. local dealDamageEvent = events.DealDamage
  6.  
  7. local player = game.Players.LocalPlayer
  8. local charater = player.Character or player.CharacterAdded:Wait()
  9. local hand = charater:FindFirstChild("Right Arm")::BasePart
  10.  
  11. local db = false
  12.  
  13. local function onInput(input, gameProcessedEvent)
  14.     if not gameProcessedEvent and not db then
  15.         if input.KeyCode == Enum.KeyCode.E then
  16.            
  17.             task.spawn(function()
  18.                 db = true
  19.                 task.wait(3)
  20.                 db = false
  21.             end)
  22.            
  23.             print("Smacked!")
  24.             playAnimationEvent:FireServer()
  25.             dealDamageEvent:FireServer()
  26.         end
  27.     end
  28. end
  29.  
  30. UIS.InputBegan:Connect(onInput)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement