Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserInputService = game:GetService("UserInputService")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local punching = false
- function doFirePunch()
- if punching or not player.Character then return end
- punching = true
- local char = player.Character
- local hrp = char:FindFirstChild("HumanoidRootPart")
- -- R15 & R6 punch animation
- local anim = Instance.new("Animation")
- anim.AnimationId = "rbxassetid://148840371" -- Replace with your custom fire punch anim
- local hum = char:FindFirstChildOfClass("Humanoid")
- local track = hum:LoadAnimation(anim)
- track:Play()
- -- Fire visual
- local fire = Instance.new("ParticleEmitter", hrp)
- fire.Texture = "rbxassetid://243098098"
- fire.Rate = 300
- fire.Lifetime = NumberRange.new(0.2)
- fire.Speed = NumberRange.new(5)
- game.Debris:AddItem(fire, 0.3)
- -- Damage effect
- for _, v in pairs(workspace:GetDescendants()) do
- if v:IsA("Humanoid") and v ~= hum then
- local root = v.Parent:FindFirstChild("HumanoidRootPart")
- if root and (root.Position - hrp.Position).Magnitude < 6 then
- v:TakeDamage(50)
- end
- end
- end
- wait(0.5)
- punching = false
- end
- -- Input for mobile & PC
- UserInputService.InputBegan:Connect(function(input, gp)
- if gp then return end
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- doFirePunch()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment