Advertisement
Black_Gear

Visualizer

Aug 7th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.11 KB | None | 0 0
  1. plr = game:service'Players'.LocalPlayer
  2. char = plr.Character
  3. local text = Instance.new("BillboardGui", char)
  4. text.Size = UDim2.new(0,100,0,40)
  5. text.StudsOffset = Vector3.new(0,3,0)
  6. text.Adornee = char.Head
  7. text.Name = "1"
  8. local text1 = Instance.new("TextLabel",text)
  9. text1.BackgroundTransparency = 1
  10. text1.TextStrokeTransparency = 1
  11. text1.TextTransparency = 1
  12. text1.BorderSizePixel = 0
  13. text1.Text = "Now Playing | "
  14. text1.Font = "Fantasy"
  15. text1.FontSize = "Size24"
  16. text1.TextStrokeTransparency = 0
  17. text1.TextColor3 = Color3.new(math.random(1,255),math.random(1,255),math.random(1,255))
  18. text1.TextStrokeColor3 = Color3.new(0,0,0)
  19. text1.Size = UDim2.new(1,0,0.5,0)
  20. sou = Instance.new('Sound')
  21. sou.SoundId = "rbxassetid://0"
  22. sou.Looped = true
  23. sou.Volume = 2.5
  24. timelength = 0
  25. soundvolume = sou.Volume
  26. allow = true
  27. cp = Instance.new('Part', char)
  28. cp.Name = "Point"
  29. cp.Anchored = true
  30. modeone = true
  31. modetwo = false
  32. soundid = ""
  33. rotate = 0
  34. protect = false
  35. color = BrickColor.new('Lime green')
  36. rainnot = true
  37. cframe = 0
  38. a = true
  39. rainyes = false
  40. parts = 10
  41. rait = 50
  42. text1.Text = "Now Playing | Nothing"
  43. cfrem = workspace
  44. folder = Instance.new('Folder', script)
  45. folder.Name = "Storage"
  46.  
  47. if char:FindFirstChild('Torso') then
  48. cfrem = char.Torso
  49. elseif char:FindFirstChild('UpperTorso') then
  50. cfrem = char.UpperTorso
  51. end
  52.  
  53. cp.Size = cfrem.Size
  54. cp.CanCollide = false
  55. cp.Transparency = 1
  56. sou.Parent = cfrem
  57.  
  58. lite = Instance.new('PointLight', cfrem)
  59. lite.Brightness = 100
  60. lite.Range = 20
  61. lite.Shadows = true
  62. lite.Enabled = false
  63.  
  64. function Random(num)
  65. local section=num % 1 * 3;
  66. local secondary=0.5 * math.pi * (section % 1);
  67. if section < 1 then
  68. return 1,1 - math.cos(secondary),1 - math.sin(secondary);
  69. elseif section < 2 then
  70. return 1 - math.sin(secondary),1,1 - math.cos(secondary);
  71. else
  72. return 1 - math.cos(secondary),1 - math.sin(secondary),1;
  73. end
  74. end
  75.  
  76. function medcircle(sizez)
  77. easy = Instance.new("Model")
  78. game:GetService("Debris"):AddItem(easy,.03)
  79. easy.Name = "Circle"
  80. easy.Parent = char
  81. position = cfrem.CFrame * CFrame.new(0,cframe,0)
  82. number = parts
  83. radius = 35
  84. size = Vector3.new(sizez, sizez, sizez)
  85.  
  86. for i=1, number do
  87. local part = Instance.new("Part")
  88. part.BrickColor = color
  89. part.formFactor = "Symmetric"
  90. part.Anchored = true
  91. part.BottomSurface = 0
  92. part.TopSurface = 0
  93. part.Material = "Neon"
  94. part.Parent = easy
  95. part.CanCollide = false
  96. part.Size = size
  97.  
  98. sine = math.sin((360/number + 360/number*i)/(180/math.pi))
  99. cosine = math.cos((360/number + 360/number*i)/(180/math.pi))
  100. part.CFrame = position + Vector3.new(radius*sine, 0, radius*cosine)
  101. part.CFrame = part.CFrame*CFrame.fromEulerAnglesXYZ(0, (360/number + 360/number*i)/(180/math.pi), 0)
  102. end
  103. end
  104.  
  105. function lowcircle(sizez)
  106. easy = Instance.new("Model")
  107. game:GetService("Debris"):AddItem(easy,.03)
  108. easy.Name = "Circle"
  109. easy.Parent = char
  110. position = cfrem.CFrame * CFrame.new(0,cframe,0)
  111. number = parts
  112. radius = sizez
  113. size = Vector3.new(1, 1, 1)
  114.  
  115. for i=1, number do
  116. local part = Instance.new("Part")
  117. part.BrickColor = color
  118. part.formFactor = "Symmetric"
  119. part.Anchored = true
  120. part.BottomSurface = 0
  121. part.TopSurface = 0
  122. part.Material = "Neon"
  123. part.Parent = easy
  124. part.CanCollide = false
  125. part.Size = size
  126.  
  127. sine = math.sin((360/number + 360/number*i)/(180/math.pi))
  128. cosine = math.cos((360/number + 360/number*i)/(180/math.pi))
  129. part.CFrame = position + Vector3.new(radius*sine, 0, radius*cosine)
  130. part.CFrame = part.CFrame*CFrame.fromEulerAnglesXYZ(0, (360/number + 360/number*i)/(180/math.pi), 0)
  131. end
  132. end
  133.  
  134. plr.Chatted:connect(function(m)
  135. if string.sub(m:lower(),1,3) == "!pl" then
  136. fold = Instance.new('Folder', folder)
  137. fold.Name = "SongStorage"
  138. val = Instance.new('NumberValue', fold)
  139. val.Name = "SongId"
  140. val.Value = string.sub(m:lower(),5,-1)
  141. val2 = Instance.new('StringValue', fold)
  142. val2.Name = "SongName"
  143. val2.Value = game:GetService("MarketplaceService"):GetProductInfo(val.Value).Name
  144. sou.SoundId = "rbxassetid://"..string.sub(m:lower(),5,-1)
  145. soundid = "rbxassetid://"..string.sub(m:lower(),5,-1)
  146. local Asset = game:GetService("MarketplaceService"):GetProductInfo(string.sub(m,5,-1))
  147. text1.Text = "Now Playing | "..Asset.Name
  148. sou:Play()
  149. end
  150.  
  151. if string.sub(m:lower(),1,4) == "!vol" then
  152. sou.Volume = string.sub(m:lower(),6,-1)
  153. end
  154.  
  155. if string.sub(m:lower(),1,9) == "!prevsong" then
  156. for _, data in pairs(folder:GetChildren()) do
  157. print(data.SongId.Value, data.SongName.Value)
  158. end
  159. end
  160.  
  161. if string.sub(m:lower(),1,7) == "!follow" then
  162. for _,v in pairs(game:service'Players':GetPlayers()) do
  163. if string.find(v.Name:lower(),string.sub(m:lower(),9,-1)) then
  164. if v.Character:FindFirstChild('Torso') then
  165. cfrem = v.Character.Torso
  166. elseif char:FindFirstChild('UpperTorso') then
  167. cfrem = v.Character.UpperTorso
  168. end
  169. sou:Destroy()
  170. text.Adornee = v.Character.Head
  171. end
  172. end
  173. for _,b in pairs(game:service'Workspace':GetChildren()) do
  174. if string.find(b.Name:lower(),string.sub(m:lower(),9,-1)) then
  175. if b:FindFirstChildOfClass'Humanoid' then
  176. if b:FindFirstChild('Torso') then
  177. cfrem = b.Torso
  178. elseif b:FindFirstChild('UpperTorso') then
  179. cfrem = b.UpperTorso
  180. end
  181. sou:Destroy()
  182. text.Adornee = b.Head
  183. end
  184. end
  185. end
  186. end
  187.  
  188. if string.sub(m:lower(),1,6) == "!parts" then
  189. parts = string.sub(m:lower(),8,-1)
  190. end
  191.  
  192. if string.sub(m:lower(),1,7) == "!height" then
  193. cframe = string.sub(m:lower(),9,-1)
  194. end
  195.  
  196. if string.sub(m:lower(),1,8) == "!protect" then
  197. protect = true
  198. end
  199.  
  200. if string.sub(m:lower(),1,9) == "!uprotect" then
  201. protect = false
  202. end
  203.  
  204. if string.sub(m:lower(),1,7) == "!prevpl" then
  205. for _, data in pairs(folder:GetChildren()) do
  206. if string.find(data:FindFirstChildOfClass('StringValue').Value:lower(),string.sub(m:lower(),9,-1)) then
  207. sou.SoundId = "rbxassetid://"..data.SongId.Value
  208. local Asset = game:GetService("MarketplaceService"):GetProductInfo(data.SongId.Value)
  209. text1.Text = "Now Playing | "..Asset.Name
  210. sou:Play()
  211. end
  212. end
  213. end
  214.  
  215. if string.sub(m:lower(),1,8) == "!rainbow" then
  216. rainnot = false
  217. rainyes = true
  218. end
  219.  
  220. if string.sub(m:lower(),1,5) == "!rate" then
  221. rait = string.sub(m:lower(),7,-1)
  222. end
  223.  
  224. if string.sub(m:lower(),1,6) == "!speed" then
  225. sou.Pitch = string.sub(m:lower(),8,-1)
  226. end
  227.  
  228. if string.sub(m:lower(),1,6) == "!stop" then
  229. text1.Text = "Now Playing | Nothing"
  230. sou:Stop()
  231. end
  232.  
  233. if string.sub(m:lower(),1,7) == "!mode 1" then
  234. modeone = true
  235. modetwo = false
  236. end
  237.  
  238. if string.sub(m:lower(),1,7) == "!mode 2" then
  239. modeone = false
  240. modetwo = true
  241. end
  242.  
  243. if string.sub(m:lower(),1,6) == "!timep" then
  244. sou.TimePosition = sou.TimePosition - string.sub(m:lower(),8,-1)
  245. end
  246.  
  247. if string.sub(m:lower(),1,9) == "!urainbow" then
  248. rainnot = true
  249. rainyes = false
  250. end
  251. end)
  252.  
  253. game:GetService('RunService').RenderStepped:connect(function()
  254. if sou.IsPlaying and modeone then
  255. lowcircle(sou.PlaybackLoudness/rait,sou.PlaybackLoudness/rait,sou.PlaybackLoudness/rait)
  256. elseif modetwo then
  257. medcircle(sou.PlaybackLoudness/rait)
  258. end
  259.  
  260. cp.Rotation = Vector3.new(rotate, rotate, rotate)
  261.  
  262. if sou.Pitch == 0 then
  263. sou.Pitch = 1
  264. elseif sou.MinDistance == 0 then
  265. sou.MinDistance = 10
  266. elseif sou.MaxDistance == 0 then
  267. sou.MaxDistance = 10000
  268. end
  269.  
  270. if rainnot and modeone then
  271. if sou.PlaybackLoudness <= 100 then
  272. lite.Enabled = false
  273. char.Humanoid.CameraOffset = Vector3.new(0,0,0)
  274. color = BrickColor.new('Lime green')
  275. elseif sou.PlaybackLoudness <= 200 then
  276. lite.Enabled = false
  277. char.Humanoid.CameraOffset = Vector3.new(0,0,0)
  278. color = BrickColor.new('Forest green')
  279. elseif sou.PlaybackLoudness <= 300 then
  280. lite.Enabled = false
  281. char.Humanoid.CameraOffset = Vector3.new(0,0,0)
  282. color = BrickColor.new('New Yeller')
  283. elseif sou.PlaybackLoudness >= 400 then
  284. lite.Enabled = true
  285. char.Humanoid.CameraOffset = Vector3.new(math.random(-0.7,0.7),math.random(-0.7,0.7),math.random(-0.7,0.7))
  286. color = BrickColor.new('Maroon')
  287. end
  288. end
  289.  
  290. if not cfrem:FindFirstChild('Sound') and allow and modeone then
  291. a = false
  292. sou = Instance.new('Sound', cfrem)
  293. sou.SoundId = soundid
  294. sou.Looped = true
  295. sou.Volume = soundvolume
  296. sou.TimePosition = soundlength
  297. sou:Play()
  298. a = true
  299. end
  300.  
  301. if not cfrem:FindFirstChild('PointLight') and allow and modeone then
  302. a = false
  303. lite = Instance.new('PointLight', cfrem)
  304. lite.Brightness = 100
  305. lite.Range = 20
  306. lite.Shadows = true
  307. lite.Enabled = false
  308. a = true
  309. end
  310.  
  311. lite.Color = Color3.new(math.random(),math.random(),math.random())
  312.  
  313. if sou.IsPlaying then
  314. if a then
  315. soundlength = sou.TimePosition
  316. end
  317. end
  318.  
  319. for _,v in pairs(workspace:children()) do
  320. if v:IsA('Model') and v:FindFirstChild("HumanoidRootPart") and v:FindFirstChildOfClass("Humanoid") then
  321. if protect then
  322. if (v.HumanoidRootPart.Position-cfrem.Position).magnitude <=50 then
  323. if v.Name ~= plr.Name then
  324. v:Destroy()
  325. end
  326. end
  327. end
  328. end
  329. end
  330.  
  331. cp.CFrame = cfrem.CFrame
  332.  
  333. if rainyes then
  334. color = BrickColor.new(Random(tick()))
  335. end
  336.  
  337. rotate = rotate + 3
  338. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement