Advertisement
antoniorigo4

HatManAudio

Jul 18th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. wait(5)
  2. local player = owner
  3. local cha = player.Character
  4. cha.Humanoid.Health = math.huge
  5. cha.Humanoid.MaxHealth = math.huge
  6. local hatmod = Instance.new("Model",cha)
  7. local main = Instance.new("Part",hatmod)
  8. local top = Instance.new("Part",hatmod)
  9. local misc = Instance.new("Part",hatmod)
  10.  
  11. main.Size = Vector3.new(0.5, 3, 3)
  12. top.Size = Vector3.new(2, 2, 2)
  13. misc.Size = Vector3.new(0.558, 2.03, 3.045)
  14.  
  15. local maintopw = Instance.new("Motor6D",hatmod)
  16. local topmiscw = Instance.new("Motor6D",hatmod)
  17.  
  18. maintopw.Part0 = main
  19. maintopw.Part1 = top
  20.  
  21.  
  22. topmiscw.Part0 = top
  23. topmiscw.Part1 = misc
  24.  
  25. maintopw.C1 = CFrame.new(1,0,0)
  26. topmiscw.C1 = CFrame.new(0.3,0,0)
  27.  
  28. main.Shape = "Cylinder"
  29. top.Shape = "Cylinder"
  30. misc.Shape = "Cylinder"
  31.  
  32. local headweld = Instance.new("Weld",main)
  33. headweld.Part0 = cha.Head
  34. headweld.Part1 = main
  35. headweld.C1 = CFrame.new(0.75,0,0) *CFrame.Angles(0,0,math.rad(90))
  36.  
  37. main.BrickColor = BrickColor.Black()
  38. top.BrickColor = BrickColor.Black()
  39. local light = Instance.new("PointLight",misc)
  40. light.Brightness = 90
  41. light.Range = 8
  42. --this is where the real party starts
  43. local sound = Instance.new("Sound",cha.Head)
  44. sound.Looped = true
  45. sound.Volume = 5
  46. local remote = Instance.new("RemoteEvent",cha)
  47. remote.OnServerEvent:Connect(function(player,value)
  48. misc.Color = Color3.new(value/math.random(2,5),value/math.random(2,5),value/math.random(2,5))
  49. light.Color = misc.Color
  50. end)
  51. player.Chatted:Connect(function(msg)
  52. if msg:sub(1,5) == "/play" then
  53. local victim = msg:sub(1,5)
  54. local soundid = string.gsub(msg,victim,"")
  55. sound.SoundId = "rbxassetid://"..soundid
  56. remote:FireClient(player,"macaroniman",soundid)
  57. sound:Play()
  58. elseif msg:sub(1,5) == "/stop" then
  59. sound:Stop()
  60. end
  61. end)
  62. script.Parent = cha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement