Advertisement
Guest User

visualizer

a guest
Apr 2nd, 2017
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.56 KB | None | 0 0
  1. local Follow='LocalPlayer'
  2. local Plr=game.Players[Follow]
  3. local Char=Plr.Character
  4. local RootPart=Char.HumanoidRootPart
  5.  
  6. local Parts=Instance.new('Model')
  7. Parts.Parent=Char
  8.  
  9. local Whitelist={}
  10.  
  11. Whitelist[Plr.Name]={Name=Plr.Name,UserId=Plr.UserId}
  12.  
  13. local Settings={
  14. Prefix='|',
  15. Color='Light red',
  16. Body=-3,
  17. Rainbow=false,
  18. Global=false,
  19. Angle=0,
  20. Goal=.15,
  21. Split=1,
  22. Parts=0,
  23. Disposition=4,
  24. Power=450,
  25. Material='Neon',
  26. Colors={
  27. Color3.fromRGB(244,66,66),
  28. Color3.fromRGB(244,149,66),
  29. Color3.fromRGB(244,203,66),
  30. Color3.fromRGB(83,244,66),
  31. Color3.fromRGB(66,244,212),
  32. Color3.fromRGB(66,152,244),
  33. Color3.fromRGB(107,66,244),
  34. Color3.fromRGB(229,66,244)
  35. }
  36. }
  37.  
  38. function Sound(Name,Looped,Pitch,Volume,ID,Parent)
  39. local Snd=Instance.new('Sound')
  40. Snd.Name=Name
  41. Snd.SoundId='rbxassetid://'..ID
  42. Snd.Looped=Looped
  43. Snd.PlaybackSpeed=Pitch
  44. Snd.Volume=Volume
  45. Snd.EmitterSize=10
  46. Snd.MaxDistance=100
  47. Snd.Parent=Parent
  48.  
  49. return Snd
  50. end
  51.  
  52. local Music=Sound('Music',true,1,1,0,RootPart)
  53.  
  54. function Part(Num)
  55. Settings.Parts=Num
  56.  
  57. for i,v in pairs(Parts:GetChildren()) do
  58. v:Destroy()
  59. end
  60.  
  61. for i=1,Num do
  62. local P=Instance.new('Part')
  63. local Light=Instance.new('PointLight')
  64. Light.Brightness=10
  65. Light.Range=10
  66. Light.Parent=P
  67. P.BrickColor=BrickColor.new(Settings.Color)
  68. P.Transparency=0
  69. P.Anchored=true
  70. P.CanCollide=false
  71. P.Material=Settings.Material
  72. P.Size=Vector3.new(.2,.2,.2)
  73. P.CFrame=CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)
  74. P.Locked=true
  75. P.Parent=Parts
  76. end
  77. end
  78.  
  79. Part(31)
  80.  
  81. function ColorChange()
  82. while game:GetService'RunService'.RenderStepped:wait() do
  83. local Color=Settings.Colors[math.random(1,#Settings.Colors)]
  84. for i,v in pairs(Parts:GetChildren()) do
  85. v.Material=Settings.Material
  86. if Settings.Rainbow==false then
  87. v.BrickColor=BrickColor.new(Settings.Color)
  88. v.PointLight.Color=Color3.fromRGB(255,255,255)
  89. else
  90. v.BrickColor=BrickColor.new(Color)
  91. v.PointLight.Color=Color
  92. end
  93. end
  94. end
  95. end
  96.  
  97. local Rad=0
  98.  
  99. function Rot()
  100. while game:GetService'RunService'.RenderStepped:wait() do
  101. Rad=Rad+1
  102.  
  103. if Rad>=360 then
  104. Rad=0
  105. end
  106.  
  107. for i,v in pairs(Parts:GetChildren()) do
  108. v.CFrame=v.CFrame:Lerp(CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)*CFrame.Angles(9,math.rad((360/Settings.Parts)*((i+(i*Settings.Angle))/Settings.Split)+Rad),0)*CFrame.new(8,-8,Settings.Disposition+(v.Size.Z)),Settings.Goal)
  109. end
  110. end
  111. end
  112.  
  113. function Size()
  114. while game:GetService'RunService'.RenderStepped:wait() do
  115. for i,v in pairs(Parts:GetChildren()) do
  116. v.Size=v.Size:Lerp(Vector3.new(.5,.5,(Music.PlaybackLoudness/Settings.Power)*math.random(9,20)),Settings.Goal)
  117. end
  118. end
  119. end
  120.  
  121. spawn(Rot)
  122. spawn(Size)
  123. spawn(ColorChange)
  124.  
  125. function Chatted(Speaker,Message)
  126. for i,v in pairs(Whitelist) do
  127. if v.Name==Speaker.Name or v.UserId==Speaker.UserId then
  128. if Message:sub(1,6):lower():match(Settings.Prefix..'play ') then
  129. Music.SoundId='rbxassetid://'..Message:sub(7)
  130. Music:Play()
  131. elseif Message:sub(1,6):lower():match(Settings.Prefix..'pause') then
  132. Music:Pause()
  133. elseif Message:sub(1,7):lower():match(Settings.Prefix..'resume') then
  134. Music:Resume()
  135. elseif Message:sub(1,6):lower():match(Settings.Prefix..'tpos ') then
  136. Music.TimePosition=tonumber(Message:sub(7))
  137. elseif Message:sub(1,6):lower():match(Settings.Prefix..'emit ') then
  138. Music.EmitterSize=tonumber(Message:sub(7))
  139. elseif Message:sub(1,5):lower():match(Settings.Prefix..'vol ') then
  140. Music.Volume=tonumber(Message:sub(6))
  141. elseif Message:sub(1,7):lower():match(Settings.Prefix..'pitch ') then
  142. Music.PlaybackSpeed=tonumber(Message:sub(8))
  143. elseif Message:sub(1,8):lower():match(Settings.Prefix..'maxdis ') then
  144. Music.MaxDistance=tonumber(Message:sub(9))
  145. elseif Message:sub(1,8):lower():match(Settings.Prefix..'prefix ') then
  146. Settings.Prefix=Message:sub(9)
  147. elseif Message:sub(1,7):lower():match(Settings.Prefix..'angle ') then
  148. Settings.Angle=tonumber(Message:sub(8))
  149. elseif Message:sub(1,7):lower():match(Settings.Prefix..'split ') then
  150. Settings.Split=tonumber(Message:sub(8))
  151. elseif Message:sub(1,6):lower():match(Settings.Prefix..'goal ') then
  152. Settings.Goal=tonumber(Message:sub(7))
  153. elseif Message:sub(1,7):lower():match(Settings.Prefix..'color ') then
  154. Settings.Color=Message:sub(8)
  155. elseif Message:sub(1,6):lower():match(Settings.Prefix..'body ') then
  156. Settings.Body=tonumber(Message:sub(7))
  157. elseif Message:sub(1,10):lower():match(Settings.Prefix..'material ') then
  158. Settings.Material=Message:sub(11)
  159. elseif Message:sub(1,7):lower():match(Settings.Prefix..'global') then
  160. if Settings.Global==false then
  161. Settings.Global=true
  162. Music.Parent=workspace
  163. else
  164. Settings.Global=false
  165. Music.Parent=RootPart
  166. end
  167. elseif Message:sub(1,6):lower():match(Settings.Prefix..'disp ') then
  168. Settings.Disposition=tonumber(Message:sub(7))
  169. elseif Message:sub(1,7):lower():match(Settings.Prefix..'parts ') then
  170. Part(tonumber(Message:sub(8)))
  171. elseif Message:sub(1,7):lower():match(Settings.Prefix..'power ') then
  172. Settings.Power=tonumber(Message:sub(8))
  173. elseif Message:sub(1,8):lower():match(Settings.Prefix..'follow ') then
  174. for i,v in pairs(game.Players:GetPlayers()) do
  175. if v.Name:lower():match(Message:sub(9):lower()) then
  176. Follow=v.Name
  177. Plr=game.Players[Follow]
  178. Char=Plr.Character
  179. RootPart=Char.HumanoidRootPart
  180. if Settings.Global==false then
  181. Music.Parent=RootPart
  182. end
  183. end
  184. end
  185. elseif Message:sub(1,11):lower():match(Settings.Prefix..'whitelist ') then
  186. for i,v in pairs(game.Players:GetPlayers()) do
  187. if v.Name:lower():match(Message:sub(12):lower()) then
  188. Whitelist[v.Name]={Name=v.Name,UserId=v.UserId}
  189. end
  190. end
  191. elseif Message:sub(1,8):lower():match(Settings.Prefix..'rainbow') then
  192. if Settings.Rainbow==false then
  193. Settings.Rainbow=true
  194. else
  195. Settings.Rainbow=false
  196. end
  197. end
  198. end
  199. end
  200. end
  201.  
  202. game.Players.PlayerAdded:connect(function(Plyr)
  203. Plyr.Chatted:connect(function(Message) Chatted(Plyr,Message) end)
  204. end)
  205.  
  206. for i,v in pairs(game.Players:GetPlayers()) do
  207. v.Chatted:connect(function(Message) Chatted(v,Message) end)
  208. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement