Tool=script.Parent Handle=Tool:WaitForChild("\072\097\110\100\108\101")Players=game:GetService("\080\108\097\121\101\114\115")Debris=game:GetService("\068\101\098\114\105\115")RbxUtility=LoadLibrary("\082\098\120\085\116\105\108\105\116\121")Create=RbxUtility.Create BaseUrl="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061"ExplosionScript=script:WaitForChild("\069\120\112\108\111\115\105\111\110\083\099\114\105\112\116")Animations={Light={Animation=Tool:WaitForChild("\076\105\103\104\116"),FadeTime=nil,Weight=nil,Speed=nil,Duration=nil}}Sounds={Fuse=Handle:WaitForChild("\070\117\115\101")}Sparks=Handle:WaitForChild("\083\112\097\114\107\115")BasePart=(Create("\080\097\114\116"))({Shape=Enum.PartType.Block;Material=Enum.Material.Plastic,TopSurface=Enum.SurfaceType.Smooth,BottomSurface=Enum.SurfaceType.Smooth,FormFactor=Enum.FormFactor.Custom,Size=Vector3.new(.2,.2,.2),CanCollide=true;Locked=true;Anchored=false})BaseFirework=Handle:Clone()BaseFirework.Name="\070\105\114\101\119\111\114\107"BaseFirework.Transparency=0 BaseFirework.Locked=true BaseFirework.CanCollide=true Rate=.016666666666667 Gravity=196.2 ReloadTime=10 ToolEquipped=false ServerControl=Tool:FindFirstChild("\083\101\114\118\101\114\067\111\110\116\114\111\108")or(Create("\082\101\109\111\116\101\070\117\110\099\116\105\111\110"))({Name="\083\101\114\118\101\114\067\111\110\116\114\111\108";Parent=Tool})ClientControl=Tool:FindFirstChild("\067\108\105\101\110\116\067\111\110\116\114\111\108")or(Create("\082\101\109\111\116\101\070\117\110\099\116\105\111\110"))({Name="\067\108\105\101\110\116\067\111\110\116\114\111\108";Parent=Tool})Sparks.Enabled=false Handle.Transparency=0 Tool.Enabled=true function FireFirework()Handle.Transparency=1 local w=BaseFirework:Clone()w.CFrame=Handle.CFrame local n=35 local a=w:GetMass()*Gravity local g=Vector3.new(0,1,0)*n local Q=(Create("\066\111\100\121\086\101\108\111\099\105\116\121"))({maxForce=Vector3.new(a,a,a);velocity=g,Parent=w})local I,C,W=Handle.CFrame:toEulerAnglesXYZ()local P=(Create("\066\111\100\121\071\121\114\111"))({maxTorque=Vector3.new(math.huge,0,math.huge),cframe=CFrame.new(0,C,0);Parent=w})w.Velocity=g Debris:AddItem(w,30.0)w.Parent=game:GetService("\087\111\114\107\115\112\097\099\101")return w end function Activated()if not Tool.Enabled or not ToolEquipped then return end local w=true ToolUnequipped=Tool.Unequipped:connect(function()w=false end)Tool.Enabled=false Sparks.Enabled=true Sounds.Fuse:Play()Spawn(function()InvokeClient("\080\108\097\121\065\110\105\109\097\116\105\111\110",Animations.Light)end)wait(2)if w then Sparks.Enabled=false local n=FireFirework()local a=ExplosionScript:Clone()a.Disabled=false a.Parent=n wait(ReloadTime)if w then Handle.Transparency=0 end end Tool.Enabled=true end function CheckIfAlive()return(Player and(Player.Parent and(Humanoid and(Humanoid.Parent and Humanoid.Health>0))))and true or false end function Equipped()Character=Tool.Parent Player=Players:GetPlayerFromCharacter(Character)Humanoid=Character:FindFirstChild("\072\117\109\097\110\111\105\100")if not CheckIfAlive()then return end for w,n in pairs({ToolUnequipped})do if n then n:disconnect()end end ToolEquipped=true end function Unequipped()Handle.Transparency=0 ToolEquipped=false end function InvokeClient(w,n)local a=nil pcall(function()a=ClientControl:InvokeClient(Player,w,n)end)return a end function OnServerInvoke(w,n,a)if w~=Player or not n or not a then return end end ServerControl.OnServerInvoke=OnServerInvoke Tool.Activated:connect(Activated)Tool.Equipped:connect(Equipped)Tool.Unequipped:connect(Unequipped)
--Made by Luckymaxer

Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")
Debris = game:GetService("Debris")

RbxUtility = LoadLibrary("RbxUtility")
Create = RbxUtility.Create

BaseUrl = "http://www.roblox.com/asset/?id="

ExplosionScript = script:WaitForChild("ExplosionScript")

Animations = {
	Light = { Animation = Tool:WaitForChild("Light"), FadeTime = nil, Weight = nil, Speed = nil, Duration = nil },
}

Sounds = {
	Fuse = Handle:WaitForChild("Fuse"),
}

Sparks = Handle:WaitForChild("Sparks")

BasePart = Create("Part")({
	Shape = Enum.PartType.Block,
	Material = Enum.Material.Plastic,
	TopSurface = Enum.SurfaceType.Smooth,
	BottomSurface = Enum.SurfaceType.Smooth,
	FormFactor = Enum.FormFactor.Custom,
	Size = Vector3.new(0.2, 0.2, 0.2),
	CanCollide = true,
	Locked = true,
	Anchored = false,
})

BaseFirework = Handle:Clone()
BaseFirework.Name = "Firework"
BaseFirework.Transparency = 0
BaseFirework.Locked = true
BaseFirework.CanCollide = true

Rate = (1 / 60)
Gravity = 196.20

ReloadTime = 10

ToolEquipped = false

ServerControl = (
	Tool:FindFirstChild("ServerControl") or Create("RemoteFunction")({
		Name = "ServerControl",
		Parent = Tool,
	})
)

ClientControl = (
	Tool:FindFirstChild("ClientControl") or Create("RemoteFunction")({
		Name = "ClientControl",
		Parent = Tool,
	})
)

Sparks.Enabled = false
Handle.Transparency = 0
Tool.Enabled = true

function FireFirework()
	Handle.Transparency = 1
	local Firework = BaseFirework:Clone()
	Firework.CFrame = Handle.CFrame
	local Force = 35
	local Mass = (Firework:GetMass() * Gravity)
	local Velocity = (Vector3.new(0, 1, 0) * Force)
	local BodyVelocity = Create("BodyVelocity")({
		maxForce = Vector3.new(Mass, Mass, Mass),
		velocity = Velocity,
		Parent = Firework,
	})
	local AngleX, AngleY, AngleZ = Handle.CFrame:toEulerAnglesXYZ()
	local BodyGyro = Create("BodyGyro")({
		maxTorque = Vector3.new(math.huge, 0, math.huge),
		cframe = CFrame.new(0, AngleY, 0),
		Parent = Firework,
	})
	Firework.Velocity = Velocity
	Debris:AddItem(Firework, (60 / 2))
	Firework.Parent = game:GetService("Workspace")
	return Firework
end

function Activated()
	if not Tool.Enabled or not ToolEquipped then
		return
	end
	local CurrentlyEquipped = true
	ToolUnequipped = Tool.Unequipped:connect(function()
		CurrentlyEquipped = false
	end)
	Tool.Enabled = false
	Sparks.Enabled = true
	Sounds.Fuse:Play()
	Spawn(function()
		InvokeClient("PlayAnimation", Animations.Light)
	end)
	wait(2)
	if CurrentlyEquipped then
		Sparks.Enabled = false
		local Firework = FireFirework()
		local ExplosionScriptClone = ExplosionScript:Clone()
		ExplosionScriptClone.Disabled = false
		ExplosionScriptClone.Parent = Firework
		wait(ReloadTime)
		if CurrentlyEquipped then
			Handle.Transparency = 0
		end
	end
	Tool.Enabled = true
end

function CheckIfAlive()
	return (((Player and Player.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false)
end

function Equipped()
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not CheckIfAlive() then
		return
	end
	for i, v in pairs({ ToolUnequipped }) do
		if v then
			v:disconnect()
		end
	end
	ToolEquipped = true
end

function Unequipped()
	Handle.Transparency = 0
	ToolEquipped = false
end

function InvokeClient(Mode, Value)
	local ClientReturn = nil
	pcall(function()
		ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
	end)
	return ClientReturn
end

function OnServerInvoke(player, Mode, Value)
	if player ~= Player or not Mode or not Value then
		return
	end
end

ServerControl.OnServerInvoke = OnServerInvoke

Tool.Activated:connect(Activated)
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
