Advertisement
antoniorigo4

HatMan

Jul 17th, 2020
1,460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.69 KB | None | 0 0
  1. local player = game.Players.antoniorigo4 --yo dudes we havent seen eachother in a long time
  2. local cha = player.Character
  3.  
  4. local hatmod = Instance.new("Model",cha)
  5. local main = Instance.new("Part",hatmod)
  6. local top = Instance.new("Part",hatmod)
  7. local misc = Instance.new("Part",hatmod)
  8.  
  9. main.Size = Vector3.new(0.5, 3, 3)
  10. top.Size = Vector3.new(2, 2, 2)
  11. misc.Size = Vector3.new(0.558, 2.03, 3.045)
  12.  
  13. local maintopw = Instance.new("Motor6D",hatmod)
  14. local topmiscw = Instance.new("Motor6D",hatmod)
  15.  
  16. maintopw.Part0 = main
  17. maintopw.Part1 = top
  18.  
  19.  
  20. topmiscw.Part0 = top
  21. topmiscw.Part1 = misc
  22.  
  23. maintopw.C1 = CFrame.new(1,0,0)
  24. topmiscw.C1 = CFrame.new(0.3,0,0)
  25.  
  26. main.Shape = "Cylinder"
  27. top.Shape = "Cylinder"
  28. misc.Shape = "Cylinder"
  29.  
  30. local headweld = Instance.new("Weld",main)
  31. headweld.Part0 = cha.Head
  32. headweld.Part1 = main
  33. headweld.C1 = CFrame.new(0.75,0,0) *CFrame.Angles(0,0,math.rad(90))
  34.  
  35. main.BrickColor = BrickColor.Black()
  36. top.BrickColor = BrickColor.Black()
  37. local light = Instance.new("PointLight",misc)
  38. light.Brightness = 90
  39. light.Range = 8
  40. --this is where the real party starts
  41. local sound = Instance.new("Sound",cha.Head)
  42. sound.Volume = 5
  43. player.Chatted:Connect(function(msg)
  44.         if msg:sub(1,5) == "/play" then
  45.         local victim = msg:sub(1,5)
  46.         local soundid = string.gsub(msg,victim,"")
  47.         sound.SoundId = "rbxassetid://"..soundid
  48.         sound:Play()
  49.     elseif msg:sub(1,5) == "/stop" then
  50.         sound:Stop()
  51.         end
  52.         end)
  53. --where the party ends :(
  54. local colormisc = coroutine.create(function()
  55.     while true do wait()
  56.         for i = 20,255 do wait()
  57.             misc.Color = Color3.fromHSV(0,0,i)
  58.             light.Color = misc.Color
  59.         end
  60.     end
  61. end)
  62. coroutine.resume(colormisc)
  63. print("Hello world!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement