Advertisement
FloweyTheFlower

Roblox Scripts #2.1 Drawing Visualiser

Aug 22nd, 2017
1,369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.10 KB | None | 0 0
  1. -- Objects
  2. MIDI = Instance.new("ScreenGui")
  3. Frame = Instance.new("Frame")
  4. ID = Instance.new("TextBox")
  5. Play = Instance.new("TextButton")
  6. Dark = Instance.new("TextButton")
  7. Bright = Instance.new("TextButton")
  8. Stop = Instance.new("TextButton")
  9. Hide = Instance.new("TextButton")
  10. Set = Instance.new("TextButton")
  11. BColor = Instance.new("TextBox")
  12. Random = Instance.new("TextButton")
  13. Material = Instance.new("TextBox")
  14. Trans = Instance.new("TextBox")
  15. plr = game.Players.LocalPlayer
  16. sound = Instance.new("Sound",plr.Character)
  17. sound.Volume = 100
  18. sound.Looped = true
  19. BVal = "Really red"
  20. MVal = "Neon"
  21. TVal = 0
  22. Active = false
  23.  
  24. -- Properties
  25.  
  26. MIDI.Name = "MIDI"
  27. MIDI.Parent = game.Players.LocalPlayer.PlayerGui
  28.  
  29. Frame.Parent = MIDI
  30. Frame.Active = true
  31. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  32. Frame.BackgroundTransparency = 0.5799999833107
  33. Frame.BorderSizePixel = 0
  34. Frame.Draggable = true
  35. Frame.Position = UDim2.new(0, 300, 0, 50)
  36. Frame.Size = UDim2.new(0, 310, 0, 200)
  37.  
  38. ID.Name = "ID"
  39. ID.Parent = Frame
  40. ID.BackgroundColor3 = Color3.new(1, 1, 1)
  41. ID.BorderSizePixel = 0
  42. ID.Position = UDim2.new(0, 100, 0, 10)
  43. ID.Size = UDim2.new(0, 120, 0, 30)
  44. ID.Font = Enum.Font.Arcade
  45. ID.FontSize = Enum.FontSize.Size18
  46. ID.Text = "155076577"
  47. ID.TextColor3 = Color3.new(0, 0, 0)
  48. ID.TextSize = 18
  49.  
  50. Material.Name = "Material"
  51. Material.Parent = Frame
  52. Material.BackgroundColor3 = Color3.new(1, 1, 1)
  53. Material.BorderSizePixel = 0
  54. Material.Position = UDim2.new(0, 210, 0, 95)
  55. Material.Size = UDim2.new(0, 90, 0, 15)
  56. Material.Font = Enum.Font.Arcade
  57. Material.FontSize = Enum.FontSize.Size14
  58. Material.Text = "Neon"
  59. Material.TextSize = 14
  60.  
  61. Trans.Name = "Trans"
  62. Trans.Parent = Frame
  63. Trans.BackgroundColor3 = Color3.new(1, 1, 1)
  64. Trans.BorderSizePixel = 0
  65. Trans.Position = UDim2.new(0, 210, 0, 75)
  66. Trans.Size = UDim2.new(0, 90, 0, 15)
  67. Trans.Font = Enum.Font.Arcade
  68. Trans.FontSize = Enum.FontSize.Size14
  69. Trans.Text = "Transparency"
  70. Trans.TextSize = 14
  71.  
  72. Set.Name = "Set"
  73. Set.Parent = Frame
  74. Set.BackgroundColor3 = Color3.new(1, 1, 1)
  75. Set.BorderSizePixel = 0
  76. Set.Position = UDim2.new(0, 210, 0, 135)
  77. Set.Size = UDim2.new(0, 90, 0, 15)
  78. Set.Font = Enum.Font.Arcade
  79. Set.FontSize = Enum.FontSize.Size14
  80. Set.Text = "Set"
  81. Set.TextSize = 14
  82. Set.MouseButton1Down:connect(function()
  83. if Active == true then
  84. Active = false
  85. end
  86. BVal = tostring(BColor.Text)
  87. TVal = tonumber(Trans.Text)
  88. MVal = tostring(Material.Text)
  89. end)
  90.  
  91. BColor.Name = "BColor"
  92. BColor.Parent = Frame
  93. BColor.BackgroundColor3 = Color3.new(1, 1, 1)
  94. BColor.BorderSizePixel = 0
  95. BColor.Position = UDim2.new(0, 210, 0, 115)
  96. BColor.Size = UDim2.new(0, 90, 0, 15)
  97. BColor.Font = Enum.Font.Arcade
  98. BColor.FontSize = Enum.FontSize.Size14
  99. BColor.Text = "Lime Green"
  100. BColor.TextSize = 14
  101.  
  102. Random.Name = "Random"
  103. Random.Parent = Frame
  104. Random.BackgroundColor3 = Color3.new(1, 1, 1)
  105. Random.BorderSizePixel = 0
  106. Random.Position = UDim2.new(0, 10, 0, 80)
  107. Random.Size = UDim2.new(0, 90, 0, 30)
  108. Random.Font = Enum.Font.Arcade
  109. Random.FontSize = Enum.FontSize.Size14
  110. Random.Text = "Random"
  111. Random.TextSize = 14
  112. Random.MouseButton1Down:connect(function()
  113. if Active == false then
  114. Active = true
  115. end
  116. end)
  117.  
  118. Play.Name = "Play"
  119. Play.Parent = Frame
  120. Play.BackgroundColor3 = Color3.new(1, 1, 1)
  121. Play.BorderSizePixel = 0
  122. Play.Position = UDim2.new(0, 10, 0, 160)
  123. Play.Size = UDim2.new(0, 90, 0, 30)
  124. Play.Font = Enum.Font.Arcade
  125. Play.FontSize = Enum.FontSize.Size14
  126. Play.Text = "Play"
  127. Play.TextSize = 14
  128. Play.MouseButton1Down:connect(function()
  129. sound.TimePosition = 0
  130. sound.Playing = true
  131. sound.SoundId = "rbxassetid://"..tonumber(ID.Text)
  132. end)
  133.  
  134. Dark.Name = "Dark"
  135. Dark.Parent = Frame
  136. Dark.BackgroundColor3 = Color3.new(1, 1, 1)
  137. Dark.BorderSizePixel = 0
  138. Dark.Position = UDim2.new(0, 10, 0, 120)
  139. Dark.Size = UDim2.new(0, 90, 0, 30)
  140. Dark.Font = Enum.Font.Arcade
  141. Dark.FontSize = Enum.FontSize.Size14
  142. Dark.Text = "Dark"
  143. Dark.TextSize = 14
  144. Dark.MouseButton1Down:connect(function()
  145. game.Lighting.TimeOfDay = 0
  146. game.Lighting.GlobalShadows = false
  147. game.Lighting.Ambient = Color3.new(0,0,0)
  148. game.Lighting.Brightness = 0
  149. end)
  150.  
  151. Bright.Name = "Bright"
  152. Bright.Parent = Frame
  153. Bright.BackgroundColor3 = Color3.new(1, 1, 1)
  154. Bright.BorderSizePixel = 0
  155. Bright.Position = UDim2.new(0, 110, 0, 120)
  156. Bright.Size = UDim2.new(0, 90, 0, 30)
  157. Bright.Font = Enum.Font.Arcade
  158. Bright.FontSize = Enum.FontSize.Size14
  159. Bright.Text = "Bright"
  160. Bright.TextSize = 14
  161. Bright.MouseButton1Down:connect(function()
  162. game.Lighting.TimeOfDay = 12
  163. game.Lighting.GlobalShadows = true
  164. game.Lighting.Ambient = Color3.fromRGB(10,10,10)
  165. game.Lighting.Brightness = 1
  166. end)
  167.  
  168. Stop.Name = "Stop"
  169. Stop.Parent = Frame
  170. Stop.BackgroundColor3 = Color3.new(1, 1, 1)
  171. Stop.BorderSizePixel = 0
  172. Stop.Position = UDim2.new(0, 110, 0, 160)
  173. Stop.Size = UDim2.new(0, 90, 0, 30)
  174. Stop.Font = Enum.Font.Arcade
  175. Stop.FontSize = Enum.FontSize.Size14
  176. Stop.Text = "Stop"
  177. Stop.TextSize = 14
  178. Stop.MouseButton1Down:connect(function()
  179. sound.Playing = false
  180. end)
  181.  
  182. Hide.Name = "Hide"
  183. Hide.Parent = Frame
  184. Hide.BackgroundColor3 = Color3.new(1, 1, 1)
  185. Hide.BorderSizePixel = 0
  186. Hide.Position = UDim2.new(0, 210, 0, 160)
  187. Hide.Size = UDim2.new(0, 90, 0, 30)
  188. Hide.Font = Enum.Font.Arcade
  189. Hide.FontSize = Enum.FontSize.Size14
  190. Hide.Text = "Clear"
  191. Hide.TextSize = 14
  192. Hide.MouseButton1Down:connect(function()
  193. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  194. if v.Name == "location" then
  195. v:Remove()
  196. end
  197. end
  198. end)
  199.  
  200. --- Made By Pugz AKA (PugLover77)
  201. plyr = game.Players.LocalPlayer
  202. c = plyr.Character
  203. RunService = game:service'RunService'
  204. mouse = game.Players.LocalPlayer:GetMouse()
  205. local draw2 = false
  206. local colorA = 1
  207. local lastPos
  208.  
  209. tool = Instance.new("HopperBin", plyr.Backpack)
  210. tool.Name = "Draw"
  211.  
  212.  
  213.  
  214. mouse = plyr:GetMouse()
  215.  
  216.  
  217. function draw(obj) --
  218. local lastPos = obj.CFrame.p
  219. coroutine.wrap(function()
  220. while wait() do
  221. if draw2 then
  222. while draw2 do
  223. wait()
  224. objC = obj:Clone()
  225. objC.Parent = c
  226. objC.Anchored = true
  227. local distance = (lastPos- obj.CFrame.p).magnitude
  228. objC.Size = Vector3.new(.1,.1,distance)
  229. objC.CFrame = CFrame.new(lastPos,obj.Position)*CFrame.new(0,0,-distance/2)
  230. lastPos = obj.CFrame.p
  231. end
  232. else
  233. break
  234. end
  235. end
  236. end)()
  237. end
  238.  
  239. tool.Selected:connect(function(mouse)
  240.  
  241. mouse.Button1Down:connect(function(mouse)
  242. draw2 = true
  243. part = Instance.new("Part", c)
  244. mesh = Instance.new("BlockMesh",part)
  245. Li = Instance.new("PointLight",part)
  246. Li.Range = 8
  247. Li.Color = part.Color
  248. part.Name = "location"
  249.  
  250. part.BottomSurface = 0
  251. part.Material = MVal
  252. part.TopSurface = 0
  253. part.Size = Vector3.new()
  254. part.Transparency = TVal
  255. if Active == true then
  256. part.Color = Color3.new(math.random(), math.random(), math.random())
  257. elseif Active == false then
  258. part.BrickColor = BrickColor.new(BVal)
  259. end
  260. Li.Color = part.Color
  261. part.FormFactor = "Custom"
  262. part.Size = Vector3.new(0.01, 0.01, 0.01)
  263. part.Anchored = true
  264. part.Locked = true
  265. coroutine.wrap(function()
  266. while part ~= nil do
  267. part.CFrame = CFrame.new(plyr:GetMouse().Hit.p.x,plyr:GetMouse().Hit.p.y,plyr:GetMouse().Hit.p.z)
  268. wait()
  269. end
  270. end)()
  271. wait()
  272. draw(part)
  273. wait()
  274. end)
  275. mouse.Button1Up:connect(function(mouse)
  276. draw2 = false
  277.  
  278. end)
  279.  
  280. end)
  281. x = 60
  282. game:GetService("RunService").Stepped:connect(function()
  283. n = sound.PlaybackLoudness
  284. if n > 500 then
  285. x = 100
  286. elseif n < 500 then
  287. x = 110
  288. end
  289. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  290. if v.Name == "location" then
  291. v.Mesh.Scale = Vector3.new(n / x, n / x, n / x)
  292. v.PointLight.Range = n / 50
  293. end
  294. end
  295. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement