Universal Script πŸ“Œ
390 Views
67 Executions

Idk

Universal Script πŸ“Œ
noahsyahmi06
noahsyahmi06First script
5 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Uhhh...

View Raw
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

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Universal Script πŸ“Œ
10.3k
264
Bumped 47 minutes ago
High QualityΒ Offering
Universal Script πŸ“Œ
8.4k
32.8k
Bumped 57 minutes ago
Key System
Script hub
22.0k
4.3k
Bumped 2 hours ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
1.1k
2.2k
Bumped 3 hours ago
Universal Script πŸ“Œ
1.6k
5.9k
Bumped 3 hours ago
Script hub
164.7k
564.9k
Bumped 6 hours ago
Key System

Script hub

Hall of Fame #6

Verified script badgeAcro Hub OP SCRIPT