lotushomerun

pen script visualizor

Jan 9th, 2018
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. sound = Instance.new("Sound",game.Players.LocalPlayer.Character)
  16. sound.Volume = 10
  17. sound.Looped = true
  18. BVal = "Deep orange"
  19. MVal = "Neon"
  20. TVal = 0
  21. Active = false
  22.  
  23. -- Properties
  24.  
  25. MIDI.Name = "MIDI"
  26. MIDI.Parent = game.Players.LocalPlayer.PlayerGui
  27.  
  28. Frame.Parent = MIDI
  29. Frame.Active = true
  30. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  31. Frame.BackgroundTransparency = 0.5799999833107
  32. Frame.BorderSizePixel = 0
  33. Frame.Draggable = true
  34. Frame.Position = UDim2.new(0, 300, 0, 50)
  35. Frame.Size = UDim2.new(0, 310, 0, 200)
  36.  
  37. ID.Name = "ID"
  38. ID.Parent = Frame
  39. ID.BackgroundColor3 = Color3.new(1, 1, 1)
  40. ID.BorderSizePixel = 0
  41. ID.Position = UDim2.new(0, 100, 0, 10)
  42. ID.Size = UDim2.new(0, 120, 0, 30)
  43. ID.Font = Enum.Font.Arcade
  44. ID.FontSize = Enum.FontSize.Size18
  45. ID.Text = "639837244"
  46. ID.TextColor3 = Color3.new(0, 0, 0)
  47. ID.TextSize = 18
  48.  
  49. Material.Name = "Material"
  50. Material.Parent = Frame
  51. Material.BackgroundColor3 = Color3.new(1, 1, 1)
  52. Material.BorderSizePixel = 0
  53. Material.Position = UDim2.new(0, 210, 0, 95)
  54. Material.Size = UDim2.new(0, 90, 0, 15)
  55. Material.Font = Enum.Font.Arcade
  56. Material.FontSize = Enum.FontSize.Size14
  57. Material.Text = "Neon"
  58. Material.TextSize = 14
  59.  
  60. Trans.Name = "Trans"
  61. Trans.Parent = Frame
  62. Trans.BackgroundColor3 = Color3.new(1, 1, 1)
  63. Trans.BorderSizePixel = 0
  64. Trans.Position = UDim2.new(0, 210, 0, 75)
  65. Trans.Size = UDim2.new(0, 90, 0, 15)
  66. Trans.Font = Enum.Font.Arcade
  67. Trans.FontSize = Enum.FontSize.Size14
  68. Trans.Text = "Transparency"
  69. Trans.TextSize = 14
  70.  
  71. Set.Name = "Set"
  72. Set.Parent = Frame
  73. Set.BackgroundColor3 = Color3.new(1, 1, 1)
  74. Set.BorderSizePixel = 0
  75. Set.Position = UDim2.new(0, 210, 0, 135)
  76. Set.Size = UDim2.new(0, 90, 0, 15)
  77. Set.Font = Enum.Font.Arcade
  78. Set.FontSize = Enum.FontSize.Size14
  79. Set.Text = "Set"
  80. Set.TextSize = 14
  81. Set.MouseButton1Down:connect(function()
  82.     if Active == true then
  83.         Active = false
  84.     end
  85.     BVal = tostring(BColor.Text)
  86.     TVal = tonumber(Trans.Text)
  87.     MVal = tostring(Material.Text)
  88. end)
  89.  
  90. BColor.Name = "BColor"
  91. BColor.Parent = Frame
  92. BColor.BackgroundColor3 = Color3.new(1, 1, 1)
  93. BColor.BorderSizePixel = 0
  94. BColor.Position = UDim2.new(0, 210, 0, 115)
  95. BColor.Size = UDim2.new(0, 90, 0, 15)
  96. BColor.Font = Enum.Font.Arcade
  97. BColor.FontSize = Enum.FontSize.Size14
  98. BColor.Text = "Lime Green"
  99. BColor.TextSize = 14
  100.  
  101. Random.Name = "Random"
  102. Random.Parent = Frame
  103. Random.BackgroundColor3 = Color3.new(1, 1, 1)
  104. Random.BorderSizePixel = 0
  105. Random.Position = UDim2.new(0, 10, 0, 80)
  106. Random.Size = UDim2.new(0, 90, 0, 30)
  107. Random.Font = Enum.Font.Arcade
  108. Random.FontSize = Enum.FontSize.Size14
  109. Random.Text = "Random"
  110. Random.TextSize = 14
  111. Random.MouseButton1Down:connect(function()
  112.     if Active == false then
  113.         Active = true
  114.     end
  115. end)
  116.  
  117. Play.Name = "Play"
  118. Play.Parent = Frame
  119. Play.BackgroundColor3 = Color3.new(1, 1, 1)
  120. Play.BorderSizePixel = 0
  121. Play.Position = UDim2.new(0, 10, 0, 160)
  122. Play.Size = UDim2.new(0, 90, 0, 30)
  123. Play.Font = Enum.Font.Arcade
  124. Play.FontSize = Enum.FontSize.Size14
  125. Play.Text = "Play"
  126. Play.TextSize = 14
  127. Play.MouseButton1Down:connect(function()
  128.     sound.TimePosition = 0
  129.     sound.Playing = true
  130.     sound.Volume = 10
  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)
Add Comment
Please, Sign In to add comment