Advertisement
NightGamingVN

public script 3 - hexagon

Jun 16th, 2019
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.70 KB | None | 0 0
  1. --pdn's music visuallizer
  2. --made by pdnghiaqoi - marseio
  3. -- inspired from super hexagon ( you should check it out )
  4. script.Parent = workspace
  5. Part = Instance.new("Part")
  6. Part.Parent = script
  7. Part.Name = "D"
  8. Part.CFrame = CFrame.new(-1.45643198, 6.93217897, -12.1461744, 0, -1, 0, 1, 0, -0, 0, 0, 1)
  9. Part.Orientation = Vector3.new(0, 0, 90)
  10. Part.Position = Vector3.new(-1.45643198, 6.93217897, -12.1461744)
  11. Part.Rotation = Vector3.new(0, 0, 90)
  12. Part.Color = Color3.new(0, 1, 1)
  13. Part.Size = Vector3.new(2.00000191, 0.0500000007, 0.0500000007)
  14. Part.Anchored = true
  15. Part.BottomSurface = Enum.SurfaceType.Smooth
  16. Part.BrickColor = BrickColor.new("Toothpaste")
  17. Part.CanCollide = false
  18. Part.Locked = true
  19. Part.Material = Enum.Material.Neon
  20. Part.TopSurface = Enum.SurfaceType.Smooth
  21. Part.brickColor = BrickColor.new("Toothpaste")
  22. Part0 = Instance.new("Part")
  23. Part0.Parent = script
  24. Part1 = Instance.new("Part")
  25. Part1.Parent = script
  26. Part2 = Instance.new("Part")
  27. Part2.Parent = script
  28.  
  29. Part3 = Instance.new("Part")
  30. Part3.Parent = script
  31.  
  32. Part4 = Instance.new("Part")
  33. Part4.Parent = script
  34. Part5 = Instance.new("Part")
  35. Part5.Parent = script
  36. Part0.Anchored = true
  37. Part1.Anchored = true
  38. Part2.Anchored = true
  39. Part3.Anchored = true
  40. Part4.Anchored = true
  41. Part5.Anchored = true
  42. Part0.CFrame = CFrame.new(14.4039917, 3.46854877, -1.67090595, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 1)
  43. Part0.Orientation = Vector3.new(0, 0, 90)
  44. Part0.Position = Vector3.new(14.4039917, 3.46854877, -1.67090595)
  45. Part0.Rotation = Vector3.new(0, 0, 90)
  46. Part0.Color = Color3.new(0, 1, 1)
  47. Part0.Size = Vector3.new(0.0910975859, 0.091097571, 2.00414658)
  48. Part0.BottomSurface = Enum.SurfaceType.Smooth
  49. Part0.BrickColor = BrickColor.new("Toothpaste")
  50. Part0.Material = Enum.Material.Neon
  51. Part0.TopSurface = Enum.SurfaceType.Smooth
  52. Part0.brickColor = BrickColor.new("Toothpaste")
  53. Part0.Anchored = true
  54. Part1.Anchored = true
  55. Part1.CFrame = CFrame.new(14.4039917, 2.62590718, -0.211396456, 2.18557048e-08, -1, -3.78551732e-08, -0.500000238, -4.37113883e-08, 0.866025388, -0.866025388, 0, -0.500000238)
  56. Part1.Orientation = Vector3.new(-60, -180, -90)
  57. Part1.Position = Vector3.new(14.4039917, 2.62590718, -0.211396456)
  58. Part1.Rotation = Vector3.new(-120, 0, 90)
  59. Part1.Color = Color3.new(0, 1, 1)
  60. Part1.Size = Vector3.new(0.0910975859, 0.091097571, 2.00414658)
  61. Part1.BottomSurface = Enum.SurfaceType.Smooth
  62. Part1.BrickColor = BrickColor.new("Toothpaste")
  63. Part1.Material = Enum.Material.Neon
  64. Part1.TopSurface = Enum.SurfaceType.Smooth
  65. Part1.brickColor = BrickColor.new("Toothpaste")
  66. Part2.CFrame = CFrame.new(14.4039917, 0.940582454, -0.211396456, -2.18557048e-08, -1, -3.78551732e-08, 0.500000238, -4.37113883e-08, 0.866025388, -0.866025388, 0, 0.500000238)
  67. Part2.Orientation = Vector3.new(-60, 0, 90)
  68. Part2.Position = Vector3.new(14.4039917, 0.940582454, -0.211396456)
  69. Part2.Rotation = Vector3.new(-60, 0, 90)
  70. Part2.Color = Color3.new(0, 1, 1)
  71. Part2.Size = Vector3.new(0.0910975859, 0.091097571, 2.00414658)
  72. Part2.BottomSurface = Enum.SurfaceType.Smooth
  73. Part2.BrickColor = BrickColor.new("Toothpaste")
  74. Part2.Material = Enum.Material.Neon
  75. Part2.TopSurface = Enum.SurfaceType.Smooth
  76. Part2.brickColor = BrickColor.new("Toothpaste")
  77. Part3.CFrame = CFrame.new(14.4039917, 0.0979548693, -1.67090595, -4.37113883e-08, -1, 0, 1, -4.37113883e-08, 0, 0, 0, 1)
  78. Part3.Orientation = Vector3.new(0, 0, 90)
  79. Part3.Position = Vector3.new(14.4039917, 0.0979548693, -1.67090595)
  80. Part3.Rotation = Vector3.new(0, 0, 90)
  81. Part3.Color = Color3.new(0, 1, 1)
  82. Part3.Size = Vector3.new(0.0910975859, 0.091097571, 2.00414658)
  83. Part3.BottomSurface = Enum.SurfaceType.Smooth
  84. Part3.BrickColor = BrickColor.new("Toothpaste")
  85. Part3.Material = Enum.Material.Neon
  86. Part3.TopSurface = Enum.SurfaceType.Smooth
  87. Part3.brickColor = BrickColor.new("Toothpaste")
  88. Part4.CFrame = CFrame.new(14.4039917, 0.940582454, -3.13041544, 2.18557048e-08, -1, -3.78551732e-08, -0.500000238, -4.37113883e-08, 0.866025388, -0.866025388, 0, -0.500000238)
  89. Part4.Orientation = Vector3.new(-60, -180, -90)
  90. Part4.Position = Vector3.new(14.4039917, 0.940582454, -3.13041544)
  91. Part4.Rotation = Vector3.new(-120, 0, 90)
  92. Part4.Color = Color3.new(0, 1, 1)
  93. Part4.Size = Vector3.new(0.0910975859, 0.091097571, 2.00414658)
  94. Part4.BottomSurface = Enum.SurfaceType.Smooth
  95. Part4.BrickColor = BrickColor.new("Toothpaste")
  96. Part4.Material = Enum.Material.Neon
  97. Part4.TopSurface = Enum.SurfaceType.Smooth
  98. Part4.brickColor = BrickColor.new("Toothpaste")
  99. Part5.CFrame = CFrame.new(14.4039917, 2.62590718, -3.13041544, -2.18557048e-08, -1, -3.78551732e-08, 0.500000238, -4.37113883e-08, 0.866025388, -0.866025388, 0, 0.500000238)
  100. Part5.Orientation = Vector3.new(-60, 0, 90)
  101. Part5.Position = Vector3.new(14.4039917, 2.62590718, -3.13041544)
  102. Part5.Rotation = Vector3.new(-60, 0, 90)
  103. Part5.Color = Color3.new(0, 1, 1)
  104. Part5.Size = Vector3.new(0.0910975859, 0.091097571, 2.00414658)
  105. Part5.BottomSurface = Enum.SurfaceType.Smooth
  106. Part5.BrickColor = BrickColor.new("Toothpaste")
  107. Part5.Material = Enum.Material.Neon
  108. Part5.TopSurface = Enum.SurfaceType.Smooth
  109. Part5.brickColor = BrickColor.new("Toothpaste")
  110. c = {Part1,Part2,Part3,Part4,Part5}
  111. local new = Part0:UnionAsync(c)
  112. new.Locked = true
  113. a1 = Instance.new("Attachment")
  114. a1.Parent = new
  115. a1.Position = Vector3.new(-1.658, -0, -0.987)
  116. a2 = Instance.new("Attachment")
  117. a2.Parent = new
  118. a2.Position = Vector3.new(-1.658, -0, 0.979)
  119. b1 = Instance.new("Attachment")
  120. b1.Parent = new
  121. b1.Position = Vector3.new(1.632, 0, 0.979)
  122. b2 = Instance.new("Attachment")
  123. b2.Parent = new
  124. b2.Position = Vector3.new(1.632, 0, -0.987)
  125. c1 = Instance.new("Attachment")
  126. c1.Parent = new
  127. c1.Position = Vector3.new(0.051, 0, -1.932)
  128. c2 = Instance.new("Attachment")
  129. c2.Parent = new
  130. c2.Position = Vector3.new(1.632, 0, -0.987)
  131. d1 = Instance.new("Attachment")
  132. d1.Parent = new
  133. d1.Position = Vector3.new(1.632, 0, 0.9)
  134. d2 = Instance.new("Attachment")
  135. d2.Parent = new
  136. d2.Position = Vector3.new(0.051, 0, 1.943)
  137. e1 = Instance.new("Attachment")
  138. e1.Parent = new
  139. e1.Position = Vector3.new(0.051, 0, 1.943)
  140. e2 = Instance.new("Attachment")
  141. e2.Parent = new
  142. e2.Position = Vector3.new(-1.644, -0, 0.9)
  143. f1 = Instance.new("Attachment")
  144. f1.Parent = new
  145. f1.Position = Vector3.new(-1.644, 0, -0.972)
  146. f2 = Instance.new("Attachment")
  147. f2.Parent = new
  148. f2.Position = Vector3.new(0.051, 0, -1.927)
  149. local xd = NumberSequence.new({
  150. NumberSequenceKeypoint.new(0,.5),
  151. NumberSequenceKeypoint.new(.1,.75),
  152. NumberSequenceKeypoint.new(.2,.5),
  153. NumberSequenceKeypoint.new(.3,.25),
  154. NumberSequenceKeypoint.new(.4,.5),
  155. NumberSequenceKeypoint.new(.5,.75),
  156. NumberSequenceKeypoint.new(.6,.5),
  157. NumberSequenceKeypoint.new(.7,.25),
  158. NumberSequenceKeypoint.new(.8,.5),
  159. NumberSequenceKeypoint.new(.9,.75),
  160. NumberSequenceKeypoint.new(1,1),
  161. })
  162. Trail0 = Instance.new("Trail")
  163. Trail1 = Instance.new("Trail")
  164. Trail2 = Instance.new("Trail")
  165. Trail3 = Instance.new("Trail")
  166. Trail4 = Instance.new("Trail")
  167. Trail5 = Instance.new("Trail")
  168. Trail0.Transparency = xd
  169. Trail1.Transparency = xd
  170. Trail2.Transparency = xd
  171. Trail3.Transparency = xd
  172. Trail4.Transparency = xd
  173. Trail5.Transparency = xd
  174. Trail0.Name = "Trail1"
  175. Trail0.Parent = new
  176. Trail0.Attachment0 = a1
  177. Trail0.Attachment1 = a2
  178. Trail0.Color = ColorSequence.new(Color3.new(0, 1, 1),Color3.new(0, 1, 1))
  179. Trail0.LightInfluence = 0
  180. Trail1.Name = "Trail2"
  181. Trail1.Parent = new
  182. Trail1.Attachment0 = b1
  183. Trail1.Attachment1 = b2
  184. Trail1.Color = ColorSequence.new(Color3.new(0, 1, 1),Color3.new(0, 1, 1))
  185. Trail1.LightInfluence = 0
  186. Trail2.Name = "Trail3"
  187. Trail2.Parent = new
  188. Trail2.Attachment0 = c1
  189. Trail2.Attachment1 = c2
  190. Trail2.Color = ColorSequence.new(Color3.new(0, 1, 1),Color3.new(0, 1, 1))
  191. Trail2.LightInfluence = 0
  192. Trail3.Name = "Trail4"
  193. Trail3.Parent = new
  194. Trail3.Attachment0 = d1
  195. Trail3.Attachment1 = d2
  196. Trail3.Color = ColorSequence.new(Color3.new(0, 1, 1),Color3.new(0, 1, 1))
  197. Trail3.LightInfluence = 0
  198. Trail4.Name = "Trail5"
  199. Trail4.Parent = new
  200. Trail4.Attachment0 = e1
  201. Trail4.Attachment1 = e2
  202. Trail4.Color = ColorSequence.new(Color3.new(0, 1, 1),Color3.new(0, 1, 1))
  203. Trail4.LightInfluence = 0
  204. Trail5.Name = "Trail6"
  205. Trail5.Parent = new
  206. Trail5.Attachment0 = f1
  207. Trail5.Attachment1 = f2
  208. Trail5.Color = ColorSequence.new(Color3.new(0, 1, 1),Color3.new(0, 1, 1))
  209. Trail5.LightInfluence = 0
  210. a = new:Clone()
  211. a.Parent = game:GetService("ReplicatedStorage")
  212. b = new:Clone()
  213. b.Parent = game:GetService("ReplicatedStorage")
  214. c = new:Clone()
  215. c.Parent = game:GetService("ReplicatedStorage")
  216. d = Part:Clone()
  217. d.Parent = game:GetService("ReplicatedStorage")
  218. e = Part:Clone()
  219. e.Parent = game:GetService("ReplicatedStorage")
  220. wait(0.5)
  221. Part0:Remove()
  222. Part1:Remove()
  223. Part2:Remove()
  224. Part3:Remove()
  225. Part4:Remove()
  226. Part5:Remove()
  227. Part:Remove()
  228. local remote = Instance.new("RemoteEvent")
  229. remote.Name = owner.UserId
  230. remote.Parent = game:GetService("ReplicatedStorage")
  231. local setting = {
  232. id = "rbxassetid://685775229";
  233. vol = 1
  234. }
  235. local sound
  236. function createsnd()
  237. sound = Instance.new("Sound")
  238. sound.Name = owner.Name
  239. sound.SoundId = setting.id
  240. sound.Volume = setting.vol
  241. sound.Looped = true
  242. sound.Parent = c
  243. sound:Play()
  244. end
  245. createsnd()
  246. owner.Chatted:Connect(function(msg)
  247. local mes = msg
  248. if string.sub(msg, 1,3) == "/e " then
  249. mes = string.sub(msg,4)
  250. end
  251. if string.sub(mes, 1,2) == "/r" then
  252. sound:Remove()
  253. createsnd()
  254. remote:FireClient(owner, sound)
  255. elseif string.sub(mes,1,4) == "vol/" then
  256. print("setted vol")
  257. if not sound or not sound.Parent == c then createsnd() remote:FireClient(owner, sound) end
  258. sound.Volume = tonumber(string.sub(mes,5))
  259. setting.vol = tonumber(string.sub(mes,5))
  260. elseif string.sub(mes,1,3) == "id/" then
  261. if not sound or not sound.Parent == c then createsnd() remote:FireClient(owner, sound) end
  262. sound:Stop()
  263. wait()
  264. print("setted id")
  265. sound.SoundId = "rbxassetid://"..tonumber(string.sub(mes,4))
  266. setting.id = "rbxassetid://"..tonumber(string.sub(mes,4))
  267. wait()
  268. sound:Play()
  269. end
  270. end)
  271. cframe = nil
  272. spawn(function()
  273. game:GetService("RunService").Stepped:connect(function()
  274. if not a or not b or not c or not d or a.Parent ~= script or b.Parent ~= script or c.Parent ~= script or d.Parent ~= script or e.Parent ~= script then
  275. a = new:Clone()
  276. a.Parent = script
  277. b = new:Clone()
  278. b.Parent = script
  279. c = new:Clone()
  280. c.Parent = script
  281. d = Part:Clone()
  282. d.Parent = script
  283. e = Part:Clone()
  284. e.Parent = script
  285. if sound and sound.Parent ~= nil then
  286. sound.Parent = c
  287. end
  288. end
  289. if not owner.Character or owner.Character == nil or not owner.Character:FindFirstChild("HumanoidRootPart") then wait() end
  290. if owner.Character:WaitForChild("HumanoidRootPart") then
  291. local Orn = owner.Character.HumanoidRootPart.Orientation
  292. local Position = owner.Character.HumanoidRootPart.Position
  293. cframe = owner.Character.HumanoidRootPart.CFrame
  294. a.Orientation = Vector3.new(90, Orn.Y, 0)
  295. a.Position = Vector3.new(Position.X,Position.Y+7.5,Position.Z)
  296. b.Orientation = Vector3.new(90, Orn.Y, 0)
  297. b.Position = Vector3.new(Position.X,Position.Y+7.5,Position.Z)
  298. c.Orientation = Vector3.new(90, Orn.Y, 0)
  299. c.Position = Vector3.new(Position.X,Position.Y+7.5,Position.Z)
  300. d.Orientation = Vector3.new(90, Orn.Y, 0)
  301. d.Position = Vector3.new(Position.X,Position.Y+7.5,Position.Z)
  302. e.Orientation = Vector3.new(0, Orn.Y, 90)
  303. e.Position = Vector3.new(Position.X,Position.Y+7.5,Position.Z)
  304. end
  305. end)
  306. end)
  307. function tween(part,size)
  308. local tweeningInformation = TweenInfo.new(0.05,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
  309. local partProperties = {
  310. Size = Vector3.new(size,0.1,size);
  311. }
  312. local Tween = game:GetService("TweenService"):Create(part,tweeningInformation,partProperties)
  313. Tween:Play()
  314. end
  315. remote:FireClient(owner, sound)
  316. NLS([==[
  317. local player = game:GetService("Players").LocalPlayer
  318. local sound
  319. local remote = game:GetService("ReplicatedStorage"):WaitForChild(player.UserId)
  320. remote.OnClientEvent:Connect(function(snd)
  321. sound = snd
  322. end)
  323. spawn(function()
  324. while wait() do
  325. if not remote then remote = game:GetService("ReplicatedStorage"):WaitForChild(player.UserId) end
  326. if not sound then wait() end
  327. if sound.Playing == true then
  328. remote:FireServer(sound.PlaybackLoudness)
  329. end
  330. end
  331. end)]==],owner.PlayerGui)
  332. local min = 100
  333. local max = 975
  334. remote.OnServerEvent:Connect(function(plr, sound)
  335. local bass = sound / min
  336. tween(a,bass)
  337. d.Size = Vector3.new(bass, 0.1, 0.1)
  338. local loud = (sound / max) * 5
  339. tween(b,loud)
  340. e.Size = Vector3.new(loud, 0.1, 0.1)
  341. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement