
390 Views
67 Executions
Idk
Universal Script π
noahsyahmi06First script
5 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Uhhh...
local tool = script.Parent
local handle = tool:WaitForChild("Handle")
-- Damage settings
local damageAmount = 25
local canDamage = false
-- Function to handle swinging and dealing damage
handle.Touched:Connect(function(hit)
if not canDamage then return end
-- Check if it hit a player
local model = hit:FindFirstAncestorOfClass("Model")
if model then
local humanoid = model:FindFirstChild("Humanoid")
if humanoid and humanoid ~= tool.Parent:FindFirstChild("Humanoid") then
humanoid:TakeDamage(damageAmount)
canDamage = false -- Prevent instant multiple hits
end
end
-- Check if it hit a destructible environment block
if hit:HasTag("Destructible") then
hit:Destroy()
end
end)
-- Activate the Sledgehammer swing
tool.Activated:Connect(function()
canDamage = true
-- Add swing animation or sound here
task.wait(0.5) -- Swing duration
canDamage = false
end)
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







