Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.15 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local char = plr.Character
  3. local pos2 = 0
  4. local m = Instance.new("Model",char)
  5. local a = Instance.new("Sound",char.Torso)
  6. a.Looped = true
  7. a.MaxDistance = 50
  8. go = true
  9. local orbits = {}
  10.  
  11. local aud = Instance.new("Part",m)
  12. aud.Anchored = true
  13. aud.CanCollide = false
  14. aud.TopSurface = "Smooth"
  15. aud.BottomSurface = "Smooth"
  16. aud.Size = Vector3.new(1.3,1.3,1.3)
  17. aud.Color = Color3.new(1,1,1)
  18. aud.Material = "Neon"
  19. aud.Locked = true
  20. local audmesh = Instance.new("SpecialMesh",aud)
  21. audmesh.MeshType = "Sphere"
  22. local selectionBox = Instance.new("SelectionBox")
  23. selectionBox.Adornee = aud
  24. selectionBox.Color3 = Color3.new(0,1,1)
  25. selectionBox.Parent = aud
  26. selectionBox.LineThickness = 0.02
  27.  
  28. local ring = Instance.new("Part",m)
  29. ring.Anchored = true
  30. ring.Size = Vector3.new(1,1,1)
  31.  
  32. local ringm = Instance.new("SpecialMesh",ring)
  33. ringm.MeshType = "FileMesh"
  34. ringm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  35. ringm.Scale = Vector3.new(1,1,1)
  36.  
  37. local bgui = Instance.new("BillboardGui", aud)
  38. bgui.Adornee = t
  39. bgui.Size = UDim2.new(1,0,2,0)
  40. bgui.ExtentsOffset = Vector3.new(0,2.5,0)
  41.  
  42. local frame = Instance.new("Frame", bgui)
  43. frame.Size = UDim2.new(0.1,0,1,0)
  44. frame.Position = UDim2.new(0.41,0,0,0)
  45. frame.BackgroundTransparency = 1
  46.  
  47. local tl = Instance.new("TextLabel", frame)
  48. tl.Text = "Waiting for audio"
  49. tl.Font = "ArialBold"
  50. tl.Size = UDim2.new(0, 200, 0, 32)
  51. tl.TextSize = 18
  52. tl.BackgroundTransparency = 1
  53. tl.AnchorPoint = Vector2.new(0.5, 0.5)
  54. tl.TextColor3 = Color3.new(1, 1, 1)
  55. tl.TextStrokeTransparency = 0.125
  56.  
  57. local tl2 = Instance.new("TextLabel", frame)
  58. tl2.Text = "Vol : " ..a.Volume
  59. tl2.Font = "ArialBold"
  60. tl2.Size = UDim2.new(0, 200, 0, 32)
  61. tl2.TextSize = 18
  62. tl2.BackgroundTransparency = 1
  63. tl2.AnchorPoint = Vector2.new(0.5, 0.5)
  64. tl2.TextColor3 = Color3.new(1, 1, 1)
  65. tl2.TextStrokeTransparency = 0.125
  66. tl2.Position = UDim2.new(0,0,0.5,0)
  67.  
  68. local tl3 = Instance.new("TextLabel", frame)
  69. tl3.Text = "User : " ..plr.Name
  70. tl3.Font = "ArialBold"
  71. tl3.Size = UDim2.new(0, 200, 0, 32)
  72. tl3.TextSize = 18
  73. tl3.BackgroundTransparency = 1
  74. tl3.AnchorPoint = Vector2.new(0.5, 0.5)
  75. tl3.TextColor3 = Color3.new(1, 1, 1)
  76. tl3.TextStrokeTransparency = 0.125
  77. tl3.Position = UDim2.new(0,0,1,0)
  78.  
  79. function planet()
  80. local audp = Instance.new("Part",aud)
  81. audp.Anchored = true
  82. audp.CanCollide = false
  83. audp.TopSurface = "Smooth"
  84. audp.BottomSurface = "Smooth"
  85. audp.Size = Vector3.new(1.3,1.3,1.3)
  86. audp.Color = Color3.new(1,1,1)
  87. audp.Material = "Neon"
  88. audp.Locked = true
  89. local audmeshp = Instance.new("SpecialMesh",audp)
  90. audmeshp.MeshType = "Sphere"
  91. local selectionBoxp = Instance.new("SelectionBox")
  92. selectionBoxp.Adornee = audp
  93. selectionBoxp.Color3 = Color3.new(0,1,1)
  94. selectionBoxp.Parent = audp
  95. selectionBoxp.LineThickness = 0.02
  96. table.insert(orbits,audp)
  97. end
  98. local pos = 0
  99. local pos2 = 0
  100.  
  101. function le()
  102. game:GetService'RunService'.RenderStepped:connect(function()
  103. pos2=pos2 + 7.2
  104. aud.CFrame = char.Torso.CFrame * CFrame.new(0,4.7,0) * CFrame.Angles(0,math.rad(360/ pos2), 0) * CFrame.Angles(math.rad(pos2/2), math.rad(pos2/2), math.rad(pos2/2))
  105. ring.CFrame = aud.CFrame * CFrame.new(0,0,0)
  106.  
  107. ring.Color = ring.Color:lerp(Color3.new(math.random(0.5,.7),math.random(0.5,.7),math.random(0.5,.7)), 0.1)
  108. ringm.Scale = ringm.Scale:lerp(Vector3.new(a.PlaybackLoudness/math.random(200,230),a.PlaybackLoudness/math.random(200,230),a.PlaybackLoudness/math.random(200,230)), .15)
  109.  
  110.  
  111.  
  112. if go == true then
  113. aud.Size = aud.Size:lerp(Vector3.new(a.PlaybackLoudness/math.random(240,360),a.PlaybackLoudness/math.random(240,360),a.PlaybackLoudness/math.random(240,360)), .15)
  114. ring.Size = ring.Size:lerp(Vector3.new(a.PlaybackLoudness/210,a.PlaybackLoudness/210,a.PlaybackLoudness/210), .15)
  115. ring.Orientation = ring.Orientation + Vector3.new(0,pos2,0)
  116. pos = pos + 0.35
  117. pos2 = pos2 + 0.35
  118. for index, t in pairs(orbits) do
  119. t.Size = t.Size:lerp(Vector3.new(a.PlaybackLoudness/450,a.PlaybackLoudness/450,a.PlaybackLoudness/450), 0.15)
  120. t.CFrame = t.CFrame:lerp(CFrame.new(aud.CFrame.p) * CFrame.Angles(0, math.rad(((360 / #orbits)*index)+pos), 0) * CFrame.new(0, math.sin(tick() + (index * (360/#orbits))), 0.1 + #orbits*.9) * CFrame.Angles(math.rad(pos2/5), math.rad(pos2/5), math.rad(pos2/5)),.25)
  121. end
  122.  
  123.  
  124. else
  125. aud.Size = Vector3.new(1.3,1.3,1.3)
  126.  
  127.  
  128.  
  129.  
  130. end
  131.  
  132.  
  133.  
  134.  
  135. end)
  136. end
  137.  
  138. if a.PlaybackLoudness >= 200 then
  139. aud.Color = Color3.new(0,0,1)
  140. wait(0.001)
  141. aud.Color = Color3.new(0,0,0.7)
  142. wait(0.001)
  143. aud.Color = Color3.new(0,0,0.5)
  144. wait(0.001)
  145. aud.Color = Color3.new(0,0,0.2)
  146. wait(0.001)
  147. aud.Color = Color3.new(0,0,0)
  148.  
  149. end
  150.  
  151. plr.Chatted:connect(function(msg)
  152. if msg == "planet" then
  153. planet()
  154. end
  155. end)
  156.  
  157. plr.Chatted:connect(function(msg)
  158. if msg:sub(1,5):lower()=='play/' then
  159. local id=tonumber(msg:match'%d+')
  160. if not id then return end
  161. a:Stop()
  162. a.Volume = 1
  163. a.SoundId='rbxassetid://'..msg:match'%d+'
  164. tl.Text = game:service'MarketplaceService':GetProductInfo(msg:match"%d+").Name
  165. a:Play()
  166. end
  167. end)
  168.  
  169. plr.Chatted:connect(function(msg)
  170. if msg:sub(1,4):lower()=='vol/' then
  171. local id=tonumber(msg:match'%d+')
  172. if not id then return end
  173. a.Volume = msg:match'%d+'
  174. tl2.Text = "Vol : " ..a.Volume
  175. end
  176. end)
  177.  
  178.  
  179. plr.Chatted:connect(function(msg)
  180. if msg:sub(1,7):lower()=="color/" then
  181. local color = msg:match'%w+'
  182. aud.BrickColor = color
  183. end
  184. end)
  185.  
  186.  
  187.  
  188.  
  189. plr.Chatted:connect(function(msg)
  190. if msg == "stop" then
  191. go = false
  192. a:Stop()
  193. end
  194. end)
  195.  
  196. plr.Chatted:connect(function(msg)
  197. if msg == "start" then
  198. go = true
  199. a:Resume()
  200. end
  201. end)
  202.  
  203. function main()
  204.  
  205. le()
  206.  
  207. end
  208. planet()
  209. planet()
  210. planet()
  211. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement