Advertisement
Stefanuk12

ROBLOX Script Builder Scripts (AudioVisual 1)

Jan 11th, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.13 KB | None | 0 0
  1.  
  2.  
  3. -- visualizer
  4. local Parts = {}
  5. local Parts2 = {}
  6. local Direction = 1
  7. local loudness = 0
  8. local TColor = BrickColor.new("Black")
  9. for i = 1, 100 do
  10.  local p = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  11.  p.Size = Vector3.new(0.2, 0.2, 0.2)
  12.  p.Anchored = true
  13.  p.CanCollide = false
  14.  p.Material = "Neon"
  15.  p.Position = game.Players.LocalPlayer.Character.Torso.Position
  16.  table.insert(Parts, p)
  17. end
  18. for i = 1, 100 do
  19.  local p = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  20.  p.Size = Vector3.new(0.2, 0.2, 0.2)
  21.  p.Anchored = true
  22.  p.CanCollide = false
  23.  p.Material = "Neon"
  24.  p.Position = game.Players.LocalPlayer.Character.Torso.Position
  25.  table.insert(Parts2, p)
  26. end
  27. local sound = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  28. sound.SoundId = "rbxassetid://574539049"
  29. sound.Volume = 1
  30. sound:Play()
  31. spawn(function()
  32.  local SelectedPart = 0
  33.  while true do
  34.    if Direction == 1 then
  35.      if SelectedPart < #Parts then
  36.        SelectedPart = SelectedPart + Direction
  37.      else
  38.        Direction = -1
  39.        TColor = BrickColor.Random()
  40.      end
  41.    elseif Direction == -1 then
  42.      if SelectedPart > 1 then
  43.        SelectedPart = SelectedPart + Direction
  44.      else
  45.        Direction = 1
  46.        TColor = BrickColor.Random()
  47.      end
  48.    end
  49.    local sel = Parts[SelectedPart]
  50.    local sel2 = Parts2[SelectedPart]
  51.    sel.BrickColor = BrickColor.Random()
  52.    sel2.BrickColor = BrickColor.Random()
  53.    loudness = sound.PlaybackLoudness / 500
  54.    sel.Size = Vector3.new(loudness, loudness, 0.2)
  55.    sel2.Size = Vector3.new(loudness, loudness, 0.2)
  56.    wait()
  57.    sel.BrickColor = TColor
  58.    sel2.BrickColor = TColor
  59.  end
  60. end)
  61. game:GetService("RunService").RenderStepped:connect(function()
  62.  for i = 1, #Parts do
  63.    if i == 1 then
  64.      Parts[i].CFrame = Parts[i].CFrame:lerp(game.Players.LocalPlayer.Character.Torso.CFrame, 0.9)
  65.    else
  66.      Parts[i].CFrame = Parts[i].CFrame:lerp(Parts[i - 1].CFrame * CFrame.Angles(-loudness / 20, math.sin(-loudness / 50), 0) * CFrame.new(0, 0, 0.15), 0.8)
  67.    end
  68.  end
  69.  for i = 1, #Parts2 do
  70.    if i == 1 then
  71.      Parts2[i].CFrame = Parts2[i].CFrame:lerp(game.Players.LocalPlayer.Character.Torso.CFrame, 0.9)
  72.    else
  73.      Parts2[i].CFrame = Parts2[i].CFrame:lerp(Parts2[i - 1].CFrame * CFrame.Angles(-loudness / 20, math.sin(loudness / 50), 0) * CFrame.new(0, 0, 0.15), 0.8)
  74.    end
  75.  end
  76. end)
  77.  
  78. -- visualizer gui
  79.  
  80. local visualizergui = Instance.new("ScreenGui")
  81. local Frame = Instance.new("Frame")
  82. local idvalue = Instance.new("TextBox")
  83. local play = Instance.new("TextButton")
  84. local volume = Instance.new("TextBox")
  85. local pitch = Instance.new("TextBox")
  86. local close = Instance.new("TextButton")
  87. local min = Instance.new("TextButton")
  88. local credits = Instance.new("TextLabel")
  89. local open = Instance.new("TextButton")
  90. local set2 = Instance.new("TextButton")
  91. local set1 = Instance.new("TextButton")
  92. local loop = Instance.new("TextButton")
  93.  
  94. --properties xd
  95. visualizergui.Name = "visualizergui"
  96. visualizergui.Parent = game.Players.LocalPlayer.PlayerGui
  97.  
  98. Frame.Parent = visualizergui
  99. Frame.BackgroundColor3 = Color3.new(0.701961, 0.952941, 1)
  100. Frame.BackgroundTransparency = 0.20000000298023
  101. Frame.BorderColor3 = Color3.new(0.211765, 0.329412, 0.415686)
  102. Frame.BorderSizePixel = 8
  103. Frame.Position = UDim2.new(0, 51, 0, 213)
  104. Frame.Size = UDim2.new(0, 418, 0, 213)
  105. Frame.Active = true
  106. Frame.Draggable = true
  107. Frame.Visible = false
  108.  
  109. idvalue.Name = "idvalue"
  110. idvalue.Parent = Frame
  111. idvalue.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  112. idvalue.BackgroundTransparency = 0.5
  113. idvalue.Size = UDim2.new(0, 418, 0, 50)
  114. idvalue.Font = Enum.Font.Fantasy
  115. idvalue.FontSize = Enum.FontSize.Size24
  116. idvalue.Text = "Put ID plz"
  117. idvalue.TextSize = 24
  118.  
  119. play.Name = "play"
  120. play.Parent = Frame
  121. play.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  122. play.BackgroundTransparency = 0.44999998807907
  123. play.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  124. play.BorderSizePixel = 3
  125. play.Position = UDim2.new(0, 9, 0, 82)
  126. play.Size = UDim2.new(0, 117, 0, 50)
  127. play.Font = Enum.Font.SourceSans
  128. play.FontSize = Enum.FontSize.Size28
  129. play.Text = "Play"
  130. play.TextSize = 28
  131.  
  132. volume.Name = "volume"
  133. volume.Parent = Frame
  134. volume.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  135. volume.BackgroundTransparency = 0.44999998807907
  136. volume.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  137. volume.BorderSizePixel = 3
  138. volume.Position = UDim2.new(0, 151, 0, 82)
  139. volume.Size = UDim2.new(0, 117, 0, 50)
  140. volume.Font = Enum.Font.SourceSans
  141. volume.FontSize = Enum.FontSize.Size28
  142. volume.Text = "Volume"
  143. volume.TextSize = 28
  144.  
  145. pitch.Name = "pitch"
  146. pitch.Parent = Frame
  147. pitch.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  148. pitch.BackgroundTransparency = 0.44999998807907
  149. pitch.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  150. pitch.BorderSizePixel = 3
  151. pitch.Position = UDim2.new(0, 291, 0, 82)
  152. pitch.Size = UDim2.new(0, 117, 0, 50)
  153. pitch.Font = Enum.Font.SourceSans
  154. pitch.FontSize = Enum.FontSize.Size28
  155. pitch.Text = "Pitch"
  156. pitch.TextSize = 28
  157.  
  158. close.Name = "close"
  159. close.Parent = Frame
  160. close.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
  161. close.BackgroundTransparency = 0.40000000596046
  162. close.Position = UDim2.new(0, 393, 0, 190)
  163. close.Size = UDim2.new(0, 25, 0, 23)
  164. close.Font = Enum.Font.SourceSans
  165. close.FontSize = Enum.FontSize.Size28
  166. close.Text = "X"
  167. close.TextSize = 28
  168.  
  169. min.Name = "min"
  170. min.Parent = Frame
  171. min.BackgroundColor3 = Color3.new(0.286275, 0.286275, 1)
  172. min.BackgroundTransparency = 0.40000000596046
  173. min.Position = UDim2.new(0, 357, 0, 190)
  174. min.Size = UDim2.new(0, 25, 0, 23)
  175. min.Font = Enum.Font.SourceSans
  176. min.FontSize = Enum.FontSize.Size36
  177. min.Text = "-"
  178. min.TextSize = 36
  179.  
  180. credits.Name = "credits"
  181. credits.Parent = Frame
  182. credits.BackgroundColor3 = Color3.new(1, 1, 1)
  183. credits.BackgroundTransparency = 1
  184. credits.Position = UDim2.new(0, 0, 0, 161)
  185. credits.Size = UDim2.new(0, 200, 0, 52)
  186. credits.Font = Enum.Font.SourceSans
  187. credits.FontSize = Enum.FontSize.Size14
  188. credits.Text = " "
  189. credits.TextSize = 14
  190. credits.TextWrapped = true
  191.  
  192. open.Name = "open"
  193. open.Parent = visualizergui
  194. open.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  195. open.BackgroundTransparency = 0.44999998807907
  196. open.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  197. open.BorderSizePixel = 3
  198. open.Position = UDim2.new(0, 0, 0, 400)
  199. open.Size = UDim2.new(0, 59, 0, 50)
  200. open.Font = Enum.Font.SourceSans
  201. open.FontSize = Enum.FontSize.Size28
  202. open.Text = "Open"
  203. open.TextSize = 28
  204. open.Visible = false
  205.  
  206. set2.Name = "set2"
  207. set2.Parent = Frame
  208. set2.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  209. set2.BackgroundTransparency = 0.44999998807907
  210. set2.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  211. set2.BorderSizePixel = 3
  212. set2.Position = UDim2.new(0, 325, 0, 136)
  213. set2.Size = UDim2.new(0, 55, 0, 25)
  214. set2.Font = Enum.Font.SourceSans
  215. set2.FontSize = Enum.FontSize.Size24
  216. set2.Text = "Set"
  217. set2.TextSize = 24
  218. set2.TextWrapped = true
  219.  
  220. set1.Name = "set1"
  221. set1.Parent = Frame
  222. set1.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  223. set1.BackgroundTransparency = 0.44999998807907
  224. set1.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  225. set1.BorderSizePixel = 3
  226. set1.Position = UDim2.new(0, 181, 0, 136)
  227. set1.Size = UDim2.new(0, 55, 0, 25)
  228. set1.Font = Enum.Font.SourceSans
  229. set1.FontSize = Enum.FontSize.Size24
  230. set1.Text = "Set"
  231. set1.TextSize = 24
  232. set1.TextWrapped = true
  233.  
  234. loop.Name = "loop"
  235. loop.Parent = Frame
  236. loop.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  237. loop.BackgroundTransparency = 0.44999998807907
  238. loop.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  239. loop.BorderSizePixel = 3
  240. loop.Position = UDim2.new(0, 241, 0, 188)
  241. loop.Size = UDim2.new(0, 84, 0, 25)
  242. loop.Font = Enum.Font.SourceSans
  243. loop.FontSize = Enum.FontSize.Size18
  244. loop.Text = "Loop : OFF"
  245. loop.TextSize = 18
  246. loop.TextWrapped = true
  247.  
  248. -- functions
  249. function start()
  250. wait(0.5)
  251. Frame.Position = UDim2.new(0, -500, 0, 400)
  252. Frame.Visible = true
  253. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,1)
  254. end
  255.  
  256. if game.Players.LocalPlayer.Character then
  257. start()
  258. else
  259. print'character not found plz try again XD'
  260. end
  261.  
  262. function minimize()
  263. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,1)
  264. credits.Text = ""
  265. min.Text = ""
  266. close.Text = ""
  267. play.Text = ""
  268. pitch.Text = ""
  269. volume.Text = ""
  270. idvalue.Text = ""
  271. set1.Text = ""
  272. set2.Text = ""
  273. loop.Text = ""
  274. Frame:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  275. credits:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  276. min:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  277. close:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  278. idvalue:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  279. volume:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  280. play:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  281. pitch:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  282. loop:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  283. set1:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  284. set2:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  285. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  286.    wait(0.5)
  287. Frame.Visible = false
  288. open.Visible = true
  289. end
  290.  
  291. function show()
  292. open.Visible = false
  293. Frame.Position = UDim2.new(0, -500, 0, 400)
  294. Frame.Visible = true
  295. credits.Text = "credits to me for gui, i didn't make the visualizer credits to whoever leaked it or made it."
  296. min.Text = "-"
  297. close.Text = "X"
  298. play.Text = "Play"
  299. pitch.Text = "Pitch"
  300. volume.Text = "Volume"
  301. idvalue.Text = "Put ID plz"
  302. set1.Text = "Set"
  303. set2.Text = "Set"
  304. loop.Text = "Loop : OFF"
  305. Frame:TweenSize(UDim2.new(0, 418, 0, 213),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  306. credits:TweenSize(UDim2.new(0, 200, 0, 52),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  307. min:TweenSize(UDim2.new(0, 25, 0, 23),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  308. close:TweenSize(UDim2.new(0, 25, 0, 23),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  309. idvalue:TweenSize(UDim2.new(0, 418, 0, 50),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  310. volume:TweenSize(UDim2.new(0, 117, 0, 50),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  311. play:TweenSize(UDim2.new(0, 117, 0, 50),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  312. pitch:TweenSize(UDim2.new(0, 117, 0, 50),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  313. set1:TweenSize(UDim2.new(0, 55, 0, 25),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  314. loop:TweenSize(UDim2.new(0, 84, 0, 25),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  315. set2:TweenSize(UDim2.new(0, 55, 0, 25),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  316. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint, 0.5)
  317. end
  318.  
  319. function exitdatshit()
  320. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,1)
  321. credits.Text = ""
  322. min.Text = ""
  323. close.Text = ""
  324. play.Text = ""
  325. pitch.Text = ""
  326. volume.Text = ""
  327. idvalue.Text = ""
  328. Frame:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  329. credits:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  330. min:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  331. close:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  332. idvalue:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  333. volume:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  334. play:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  335. pitch:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  336. set1:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  337. set2:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  338. loop:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  339. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  340. wait(0.5)
  341.    visualizergui:Destroy()
  342. end
  343.  
  344. -- events
  345. wait(1)
  346. min.MouseButton1Down:connect(function()
  347. minimize()
  348. end)
  349.  
  350. open.MouseButton1Down:connect(function()
  351. show()
  352. end)
  353.  
  354. close.MouseButton1Down:connect(function()
  355. exitdatshit()
  356. end)
  357.  
  358. set1.MouseButton1Down:connect(function()
  359. sound.Volume = volume.Text
  360. end)
  361.  
  362. set2.MouseButton1Down:connect(function()
  363. sound.Pitch = pitch.Text
  364. end)
  365.  
  366. play.MouseButton1Down:connect(function()
  367. sound.TimePosition = 0
  368. sound.SoundId = "rbxassetid://" .. idvalue.Text
  369. end)
  370.  
  371. loop.MouseButton1Down:connect(function()
  372. if loop.Text == "Loop : OFF" then
  373. sound.Looped = true
  374. loop.Text = "Loop : ON"
  375. else
  376. sound.Looped = false
  377. loop.Text = "Loop : OFF"
  378. end
  379. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement