Advertisement
Elvisfofo_rblx

Explode Punch

Jun 22nd, 2025
1,184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local UserInputService = game:GetService("UserInputService")
  3. local Debris = game:GetService("Debris")
  4. local LocalPlayer = Players.LocalPlayer
  5.  
  6. local function getCharacter()
  7. return LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  8. end
  9.  
  10. -- Detect rig type
  11. local function getRigType()
  12. local humanoid = getCharacter():FindFirstChildOfClass("Humanoid")
  13. return humanoid and humanoid.RigType == Enum.HumanoidRigType.R15 and "R15" or "R6"
  14. end
  15.  
  16. -- Play punch animation
  17. local function playPunchAnim()
  18. local character = getCharacter()
  19. local humanoid = character:FindFirstChildOfClass("Humanoid")
  20. if not humanoid then return end
  21.  
  22. local anim = Instance.new("Animation")
  23. anim.AnimationId = getRigType() == "R15" and "rbxassetid://507777826" or "rbxassetid://148840371" -- R15 and R6 punch
  24.  
  25. local track = humanoid:LoadAnimation(anim)
  26. track:Play()
  27. Debris:AddItem(anim, 3)
  28. end
  29.  
  30. -- Explosion on punch
  31. local punching = false
  32. local function doExplodePunch()
  33. if punching then return end
  34. punching = true
  35.  
  36. local character = getCharacter()
  37. local hand = character:FindFirstChild("RightHand") or character:FindFirstChild("Right Arm")
  38. if not hand then return end
  39.  
  40. playPunchAnim()
  41. wait(0.2)
  42.  
  43. -- Create explosion at hand
  44. local explosion = Instance.new("Explosion")
  45. explosion.Position = hand.Position
  46. explosion.BlastRadius = 10
  47. explosion.BlastPressure = 500000
  48. explosion.DestroyJointRadiusPercent = 0
  49. explosion.ExplosionType = Enum.ExplosionType.NoCraters
  50. explosion.Parent = workspace
  51.  
  52. -- Damage players
  53. explosion.Hit:Connect(function(part, distance)
  54. local victim = part:FindFirstAncestorOfClass("Model")
  55. if victim and victim ~= character and victim:FindFirstChild("Humanoid") then
  56. victim.Humanoid:TakeDamage(100)
  57. end
  58. end)
  59.  
  60. wait(0.8)
  61. punching = false
  62. end
  63.  
  64. -- Tap anywhere to punch
  65. UserInputService.TouchTap:Connect(function()
  66. doExplodePunch()
  67. end)
  68.  
  69. -- Optional notification
  70. pcall(function()
  71. game.StarterGui:SetCore("SendNotification", {
  72. Title = "💥 Explode Punch Ready",
  73. Text = "Tap anywhere to smash and explode!",
  74. Duration = 4
  75. })
  76. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement