Idk
Key RequiredUniversal

Idk

Universal Scriptnoahsyahmi06noahsyahmi06 358 views 32 executesUpdated Jul 4, 2026
Unrated
00
Lua Script•34 lines (887 chars)
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)

Features & Information

Uhhh...

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts