Advertisement
otorp2

rblox hat

Jan 5th, 2020
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. local debounce = true
  2. script.Parent.Touched:connect(function(hit)
  3. if debounce == true then
  4. debounce = false
  5. local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
  6. --local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
  7. local char = plr.Character
  8.  
  9. for _,find in ipairs(char:GetChildren()) do
  10. if find.ClassName == 'Accessory' then
  11.  
  12. find:Destroy()
  13. end
  14. end
  15. local top = Instance.new('Part',char)
  16. top.Size = Vector3.new(1,2,1)
  17. Instance.new('CylinderMesh',top)
  18. top.CanCollide = false
  19. top:BreakJoints()
  20. top.BrickColor = BrickColor.new('Really red')
  21. local topWeld = Instance.new('Weld',top)
  22. topWeld.Part0 = top
  23. topWeld.Part1 = char.Head
  24. topWeld.C0 = CFrame.new(0,-1.5,0)
  25.  
  26. local bottom = Instance.new('Part',char)
  27. bottom.Size = Vector3.new(2,.1,2)
  28. bottom.CanCollide = false
  29. bottom:BreakJoints()
  30. local bottomWeld = Instance.new('Weld',bottom)
  31. bottomWeld.Part0 = bottom
  32. bottomWeld.Part1 = char.Head
  33. bottomWeld.C0 = CFrame.new(0,-.5,0)
  34. bottom.BrickColor = BrickColor.new('Really red')
  35. Instance.new('CylinderMesh',bottom)
  36. end
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement