--Stickmasterluke



sp=script.Parent


timer=20
soundinterval=1


starttime=tick()
attached=false
debris=game:GetService("Debris")


function makeconfetti()
	local explosion = Instance.new("Explosion", sp)
	sp.Anchored = true	
	explosion.Position = sp.Position
	sp.PleaseNo:Play()
end


sp.Touched:connect(function(hit)
	if (not attached) and hit and hit~=nil and sp~=nil then
		local ct=sp:FindFirstChild("creator")
		if ct.Value~=nil and ct.Value.Character~=nil then
			if hit.Parent~=ct.Value.Character and hit.Name~="Handle" and hit.Name~="Effect" then
				local h=hit.Parent:FindFirstChild("Humanoid")
				local t=hit.Parent:FindFirstChild("UpperTorso")
				if h~=nil and t~=nil and h.Health>0 then
					attached=true
					local w=Instance.new("Weld")
					w.Part0=t
					w.Part1=sp
					w.C0=CFrame.new(0,0,.8)*CFrame.Angles(math.pi/2,3.5,0)
					w.Parent=sp
				end
			end
		end
	end
end)

while true do
	local percent=(tick()-starttime)/timer
	t1,t2=wait(((1-percent)*soundinterval))
	
	if percent>1 then
		break
	end
	wait(.1)
	
end

wait(4)

wait(.5)


wait(2.5)

sp:remove()
