Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UIS = game:GetService("UserInputService")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local debounce = false
- function doExplodePunch()
- if debounce or not player.Character then return end
- debounce = true
- local char = player.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local hrp = char:FindFirstChild("HumanoidRootPart")
- if not hum or not hrp then return end
- -- Punch Animation (R6 + R15 compatible)
- local anim = Instance.new("Animation")
- anim.AnimationId = "rbxassetid://148840371" -- Replace with your preferred punch animation
- local track = hum:LoadAnimation(anim)
- track:Play()
- -- Explosion Effect
- wait(0.2) -- delay slightly to sync with animation
- local boom = Instance.new("Explosion")
- boom.Position = hrp.Position + hrp.CFrame.LookVector * 3
- boom.BlastRadius = 10
- boom.BlastPressure = 50000
- boom.DestroyJointRadiusPercent = 0
- boom.Parent = workspace
- -- Damage nearby humanoids
- for _, obj in ipairs(workspace:GetDescendants()) do
- if obj:IsA("Humanoid") and obj ~= hum then
- local root = obj.Parent:FindFirstChild("HumanoidRootPart")
- if root and (root.Position - boom.Position).Magnitude <= 10 then
- obj:TakeDamage(60)
- end
- end
- end
- wait(1)
- debounce = false
- end
- -- Detect tap/click
- UIS.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed then return end
- if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
- doExplodePunch()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment