local s=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local k=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local r=script.Parent local z={}local t=false local w=false local T=1 local d=nil local O=nil r.Activated:Connect(function()if not w then w=true task.delay(T,function()w=false end)local R=r.Parent if not t then t=true O=R.Humanoid:LoadAnimation(s.MinkV4.Laugh)O:Play()R.HumanoidRootPart.Anchored=true d=s.MinkV4.Props.Tail:Clone()d.Parent=R local r=Instance.new("\065\116\116\097\099\104\109\101\110\116")r.Parent=R.HumanoidRootPart r.Position=Vector3.new(0,-2.5,0)local w=s.MinkV4.Effects.Wave:Clone()w.Parent=r local T=s.MinkV4.Effects.Smoke:Clone()T.Parent=R.HumanoidRootPart local J=s.MinkV4.Effects.Pixel:Clone()J.Parent=R.HumanoidRootPart local Y=s.MinkV4.Sound.Laugh:Clone()Y.Parent=R.HumanoidRootPart local j=s.MinkV4.Sound.Smoke:Clone()j.Parent=R.HumanoidRootPart Y:Play()task.delay(1.6,function()Y:Destroy()task.wait(.25)R.HumanoidRootPart.Anchored=false O:Stop()end)j:Play()local i=k:Create(j,TweenInfo.new(1.5),{Volume=0})i:Play()i.Completed:Connect(function()j:Destroy()end)w:Emit(2)T:Emit(100)J:Emit(50)for s,k in ipairs(R.Humanoid:GetAccessories())do local r=k.Handle:FindFirstChild("\072\097\105\114\065\116\116\097\099\104\109\101\110\116")~=nil if r then z[k]={TextureID=k.Handle.TextureID;Color=k.Handle.Color,Material=k.Handle.Material}k.Handle.Color=Color3.fromRGB(168,168,168)k.Handle.TextureID=""k.Handle.Material=Enum.Material.Neon end end elseif t then t=false local s=k:Create(d.Handle,TweenInfo.new(.5),{Transparency=1})s:Play()s.Completed:Connect(function()d:Destroy()end)for s,k in ipairs(R.Humanoid:GetAccessories())do local r=k.Handle:FindFirstChild("\072\097\105\114\065\116\116\097\099\104\109\101\110\116")~=nil if r then k.Handle.Color=z[k].Color k.Handle.Material=z[k].Material k.Handle.TextureID=z[k].TextureID z[k]=nil end end end end end)


local RS = game:GetService('ReplicatedStorage')
local TS = game:GetService('TweenService')

local Tool = script.Parent
local TextureArray = {}

local Activated = false
local Debounce = false
local Cooldown = 1
local Prop = nil
local LaughAnim = nil

Tool.Activated:Connect(function()
	if not Debounce then
		Debounce = true
		task.delay(Cooldown, function()
			Debounce = false
		end)
		
		local Character = Tool.Parent
		
		if not Activated then
			Activated = true
			
			LaughAnim = Character.Humanoid:LoadAnimation(RS.MinkV4.Laugh)
			LaughAnim:Play()
			Character.HumanoidRootPart.Anchored = true
			
			Prop = RS.MinkV4.Props.Tail:Clone()
			Prop.Parent = Character
	 
			local Attachment = Instance.new('Attachment')
			Attachment.Parent = Character.HumanoidRootPart
			Attachment.Position = Vector3.new(0,-2.5,0)

			local Wave = RS.MinkV4.Effects.Wave:Clone()
			Wave.Parent = Attachment

			local Smoke = RS.MinkV4.Effects.Smoke:Clone()
			Smoke.Parent = Character.HumanoidRootPart

			local Pixel = RS.MinkV4.Effects.Pixel:Clone()
			Pixel.Parent = Character.HumanoidRootPart

			local Laugh = RS.MinkV4.Sound.Laugh:Clone()
			Laugh.Parent = Character.HumanoidRootPart

			local SmokeSound = RS.MinkV4.Sound.Smoke:Clone()
			SmokeSound.Parent = Character.HumanoidRootPart

			Laugh:Play()

			task.delay(1.6,function()
				Laugh:Destroy()
				task.wait(0.25)
				Character.HumanoidRootPart.Anchored = false
				LaughAnim:Stop()
			end)

			SmokeSound:Play()

			local Tween = TS:Create(SmokeSound, TweenInfo.new(1.5), {Volume = 0})
			Tween:Play()

			Tween.Completed:Connect(function()
				SmokeSound:Destroy()
			end)	

			Wave:Emit(2)
			Smoke:Emit(100)
			Pixel:Emit(50)

			for _, Item in ipairs(Character.Humanoid:GetAccessories()) do
				local Hair = Item.Handle:FindFirstChild("HairAttachment") ~= nil
				if Hair then
					TextureArray[Item] = {TextureID = Item.Handle.TextureID, Color = Item.Handle.Color, Material = Item.Handle.Material}
					Item.Handle.Color = Color3.fromRGB(168, 168, 168)
					Item.Handle.TextureID = ''
					Item.Handle.Material = Enum.Material.Neon
				end
			end
			
		elseif Activated then
			Activated = false
			
			local Tween = TS:Create(Prop.Handle, TweenInfo.new(0.5), {Transparency = 1})
			Tween:Play()

			Tween.Completed:Connect(function()
				Prop:Destroy()
			end)
			
			for _, Item in ipairs(Character.Humanoid:GetAccessories()) do
				local Hair = Item.Handle:FindFirstChild("HairAttachment") ~= nil
				if Hair then
					Item.Handle.Color = TextureArray[Item].Color
					Item.Handle.Material = TextureArray[Item].Material
					Item.Handle.TextureID = TextureArray[Item].TextureID
					TextureArray[Item] = nil
				end
			end
		end
	end
end)
