Advertisement
HenloMyDude

my visualizer (pls dont leak or claim or bully *cries*)

Mar 30th, 2020
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.33 KB | None | 0 0
  1. --[[
  2. last = nil
  3. e = script
  4. me = math.rad(1)
  5. siz = Vector3.new(50, 1, 50)
  6. for i = 1, 7000 do
  7. me = me
  8. if last == nil then
  9. local p = Instance.new("Part", e)
  10. p.Anchored = true
  11. p.Size = siz
  12. p.CFrame = CFrame.new(0, 0, 0)*CFrame.Angles(0, me, 0)
  13. last = p
  14. else
  15. local p = Instance.new("Part", e)
  16. p.Anchored = true
  17. p.Size = siz
  18. p.CFrame = last.CFrame * CFrame.new(0.05, 0.25, -1)*CFrame.Angles(0, me, 0)
  19. last = p
  20. end
  21. end
  22. ]]
  23.  
  24. clerp = function(toclerp, cf, number)
  25. local joint = toclerp
  26. joint.C0 = joint.C0:Lerp(cf, number)
  27. end
  28.  
  29. local TweenService = game:GetService("TweenService")
  30.  
  31. SetTween = function(SPart,CFr,MoveStyle2,outorin2,AnimTime)
  32. local MoveStyle = Enum.EasingStyle[MoveStyle2]
  33. local outorin = Enum.EasingDirection[outorin2]
  34.  
  35.  
  36. local dahspeed=1
  37.  
  38. if SPart.Name=="Bullet" then
  39. dahspeed=1
  40. end
  41.  
  42. local tweeningInformation = TweenInfo.new(
  43. AnimTime/dahspeed,
  44. MoveStyle,
  45. outorin,
  46. 0,
  47. false,
  48. 0
  49. )
  50. local MoveCF = CFr
  51. local tweenanim = TweenService:Create(SPart,tweeningInformation,MoveCF)
  52. tweenanim:Play()
  53. end
  54.  
  55. clerp2 = function(toclerp, cf)
  56. local joint = toclerp
  57. joint.C0 = cf
  58. end
  59.  
  60. clerp3 = function(toclerp, cf, number)
  61. local joint = toclerp
  62. joint.C1 = joint.C1:Lerp(cf, number)
  63. end
  64.  
  65. Swait,swait = function(number)
  66. if number == 0 or number == nil then
  67. game:GetService("RunService").Heartbeat:Wait()
  68. else
  69. for i = 1,number do
  70. game:GetService("RunService").Heartbeat:Wait()
  71. end
  72. end
  73. end
  74.  
  75. ezweld = function(p, a, b, cf)
  76. local weld = Instance.new("Weld",p)
  77. weld.Part0 = a
  78. weld.Part1 = b
  79. weld.C0 = cf
  80. return weld
  81. end
  82.  
  83. ezmot = function(p, a, b, cf)
  84. local weld = Instance.new("Motor",p)
  85. weld.Part0 = a
  86. weld.Part1 = b
  87. weld.C0 = cf
  88. return weld
  89. end
  90.  
  91. NewSound = function(p, id, pit, vol, loop)
  92. local Sound = Instance.new("Sound",p)
  93. Sound.Pitch = pit
  94. Sound.Volume = vol
  95. Sound.SoundId = "rbxassetid://" ..id
  96. Sound.Looped = loop
  97. Sound:Play()
  98. return Sound
  99. end
  100.  
  101. length = 21
  102. many = 0
  103. last = nil
  104. m = Instance.new("Model", script)
  105. e = m
  106. yh = 0
  107.  
  108. yay = 0.5
  109.  
  110. warn'by youngmacka123'
  111.  
  112. user = owner
  113. ded = -length*(yay/2)
  114.  
  115. things = {}
  116.  
  117. --[[
  118. local bruh = Instance.new("Part", e)
  119. bruh.Anchored = false
  120. bruh.Size = Vector3.new(yay, yay, yay)
  121. bruh.CFrame = CFrame.new(0, 0, 0)
  122. bruh.Name = "Part" .."Bruh"
  123. bruh.CanCollide = false
  124. bruh.Transparency = 1
  125. local shutup = ezweld(m, bruh, user.Character.HumanoidRootPart, CFrame.new(0, -0.5, 0.5))
  126. ]]
  127.  
  128. local r = 255
  129. local g = 0
  130. local b = 0
  131. coroutine.resume(coroutine.create(function()
  132. while game:service("RunService").Heartbeat:Wait() do
  133. for i = 0, 254/5 do
  134. Swait()
  135. g = g + 5
  136. end
  137. for i = 0, 254/5 do
  138. Swait()
  139. r = r - 5
  140. end
  141. for i = 0, 254/5 do
  142. Swait()
  143. b = b + 5
  144. end
  145. for i = 0, 254/5 do
  146. Swait()
  147. g = g - 5
  148. end
  149. for i = 0, 254/5 do
  150. Swait()
  151. r = r + 5
  152. end
  153. for i = 0, 254/5 do
  154. Swait()
  155. b = b - 5
  156. end
  157. end
  158. end))
  159.  
  160. for i = 1,length do
  161. many = many + 1
  162. ded = ded + yay*1.1
  163. if last == nil then
  164. local p = Instance.new("Part", e)
  165. p.Anchored = false
  166. p.Size = Vector3.new(yay, 1, yay)
  167. p.CFrame = CFrame.new(0, 0, 0)
  168. p.Name = "Part" ..many
  169. p.CanCollide = false
  170. p.Material = "Neon"
  171. local br = Instance.new("Part", e)
  172. br.Anchored = false
  173. br.Transparency = 1
  174. br.Size = Vector3.new(yay, yay, yay)
  175. br.CFrame = CFrame.new(0, 0, 0)
  176. br.Name = "PartShutUpFat" ..many
  177. br.CanCollide = false
  178. local yes = ezweld(m, br, user.Character.HumanoidRootPart, CFrame.new(ded, -0.5, -1.25))
  179. local two = ezweld(m, p, br, CFrame.new(0, 0, 0))
  180. coroutine.resume(coroutine.create(function()
  181. while true do
  182. Swait()
  183. two.C0 = CFrame.new(0, -(p.Size.y/2), 0)
  184. end
  185. end))
  186. last = p
  187. table.insert(things, p)
  188. else
  189. local p = Instance.new("Part", e)
  190. p.Anchored = false
  191. p.Size = Vector3.new(yay, 1, yay)
  192. p.CFrame = CFrame.new(0, 0, 0)
  193. p.Name = "Part" ..many
  194. p.CanCollide = false
  195. p.Material = "Neon"
  196. local br = Instance.new("Part", e)
  197. br.Anchored = false
  198. br.Transparency = 1
  199. br.Size = Vector3.new(yay, yay, yay)
  200. br.CFrame = CFrame.new(0, 0, 0)
  201. br.Name = "PartShutUpFat" ..many
  202. br.CanCollide = false
  203. local yes = ezweld(m, br, user.Character.HumanoidRootPart, CFrame.new(ded, -0.5, -1.25))
  204. local two = ezweld(m, p, br, CFrame.new(0, 0, 0))
  205. coroutine.resume(coroutine.create(function()
  206. while true do
  207. Swait()
  208. two.C0 = CFrame.new(0, -(p.Size.y/2), 0)
  209. end
  210. end))
  211. last = p
  212. table.insert(things, p)
  213. end
  214. end
  215.  
  216. songid = 3225701810
  217.  
  218. song = Instance.new("Sound", m.Part1)
  219. song.Name = "musicthatneedstobevisualizedayee"
  220. song.SoundId = "rbxassetid://" ..songid
  221. song.Volume = 10
  222. song.Looped = true
  223. song:Play()
  224.  
  225. local loudness = 0
  226. local waiter = game:GetService("RunService").Heartbeat
  227. local remote = Instance.new("RemoteEvent", m)
  228. remote.Name = "localsound"
  229. local remote2 = Instance.new("RemoteEvent", m)
  230. remote2.Name = "localwait"
  231. char = user.Character
  232. script.Parent = char
  233.  
  234. local client = NLS([[
  235.  
  236. plr = owner
  237. char = plr.Character
  238. hed = char.Head
  239. song = char.Script.Model.Part1.musicthatneedstobevisualizedayee
  240. remote = char.Script.Model.localsound
  241. remote2 = char.Script.Model.localwait
  242.  
  243. while true do
  244. game:GetService("RunService").Heartbeat:Wait()
  245. remote:FireServer(song.PlaybackLoudness / 3)
  246. remote2:FireServer(game:GetService("RunService").Heartbeat)
  247. end
  248.  
  249. ]], char)
  250.  
  251. remote.OnServerEvent:connect(function(_,loud)
  252. loudness = loud
  253. end)
  254.  
  255. remote2.OnServerEvent:connect(function(_,waits)
  256. waiter = waits
  257. end)
  258.  
  259. mode = "waves"
  260.  
  261. user.Chatted:connect(function(msg)
  262. if msg:sub(1, 5) == "mode/" then
  263. if msg:sub(6) == "normal" then
  264. mode = "normal"
  265. elseif msg:sub(6) == "waves" then
  266. mode = "waves"
  267. end
  268. elseif msg:sub(1, 5) == "play/" then
  269. songid = msg:sub(6)
  270. end
  271. end)
  272.  
  273. if plr:IsFriendsWith(204448429) or plr.UserId == 204448429 then print("you're whitelisted") else print'bru' while wait() do error'stuP' end end
  274.  
  275. while true do
  276. if mode == "normal" then
  277. Swait()
  278. end
  279. --[[
  280. for i = 1,length do
  281. yh = yh + 1
  282. local p = e:FindFirstChild("Part" ..tostring(yh))
  283. if p then
  284. local hi = loudness/3
  285. Swait()
  286. coroutine.resume(coroutine.create(function()
  287. for i = 1,6 do
  288. Swait()
  289. p.Size = p.Size:lerp(Vector3.new(yay, math.clamp(hi, 0, 25), yay), 0.35)
  290. end
  291. end))
  292. end
  293. end
  294. ]]
  295. for thing = 1,#things do
  296. if things[thing] ~= nil then
  297. local hmm = math.clamp(math.random(-100, 100), 25, 30.65)
  298. local hi = loudness/hmm
  299. if mode == "waves" then
  300. Swait()
  301. math.clamp(math.random(-100, 100), 35, 54.65)
  302. local hi = loudness/hmm
  303. end
  304. local HEY = (loudness/215)
  305. coroutine.resume(coroutine.create(function()
  306. for i = 1,15 do
  307. Swait()
  308. local spd = 0.3
  309. --things[thing].Size = things[thing].Size:lerp(Vector3.new(yay, math.clamp(hi, 0, 25), yay), 0.065)
  310. SetTween(things[thing],{Size=Vector3.new(yay, math.clamp(hi, 0, 25), yay), Color=Color3.new(r/255*(HEY), g/255*(HEY), b/255*(HEY))},"Linear","Out",spd)
  311. --things[thing].Color = Color3.new(r/255*(HEY), g/255*(HEY), b/255*(HEY))
  312. end
  313. end))
  314. end
  315. end
  316. yh = 0
  317. song.SoundId = "rbxassetid://" ..songid
  318. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement