Advertisement
Guest User

Roblox Hat Giver

a guest
May 8th, 2016
10,873
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- (Hat Giver Script - Loaded.)
  2.  
  3. debounce = true
  4.  
  5. function onTouched(hit)
  6.     if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
  7.         debounce = false
  8.         h = Instance.new("Hat")
  9.         p = Instance.new("Part")
  10.         h.Name = "Ultra-Fabulous Hair"
  11.         p.Parent = h
  12.         p.Position = hit.Parent:findFirstChild("Head").Position
  13.         p.Name = "Handle"
  14.         p.formFactor = 0
  15.         p.Size = Vector3.new(2,2,2)
  16.         p.BottomSurface = 0
  17.         p.TopSurface = 0
  18.         p.Locked = true
  19.         script.Parent.Mesh:clone().Parent = p
  20.         h.Parent = hit.Parent
  21.         h.AttachmentPos = Vector3.new(0, 0, 0)
  22.         wait(5)
  23.         debounce = true
  24.     end
  25. end
  26.  
  27. script.Parent.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement