debounce=true function onTouched(r)if r.Parent:findFirstChild("\072\117\109\097\110\111\105\100")~=nil and debounce==true then debounce=false h=Instance.new("\072\097\116")p=Instance.new("\080\097\114\116")h.Name="\071\114\101\101\110\070\097\098\114\101\103\101"p.Parent=h p.Position=(r.Parent:findFirstChild("\072\101\097\100")).Position p.Name="\072\097\110\100\108\101"p.formFactor=0 p.Size=Vector3.new(2,1,1)p.BottomSurface=0 p.TopSurface=0 p.Locked=true;(script.Parent.Mesh:clone()).Parent=p h.Parent=r.Parent h.AttachmentPos=Vector3.new(0,-1.125,0)wait(5)debounce=true end end script.Parent.Touched:connect(onTouched)
-- (Hat Giver Script - Loaded.)

debounce = true

function onTouched(hit)
	if hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "GreenFabrege"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle"
		p.formFactor = 0
		p.Size = Vector3.new(2, 1, 1)
		p.BottomSurface = 0
		p.TopSurface = 0
		p.Locked = true
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, -1.125, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
