Advertisement
basbas1234

Music Player

Oct 5th, 2019
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.38 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Compatibility Part
  3. local CurrentUser = script:WaitForChild("Owner") local Detector = CurrentUser:WaitForChild("Detector") CurrentUser.Value = game.Players:GetPlayerFromCharacter(script.Parent) if (CurrentUser or Detector) == nil then print("Not Found Default Variables"); return end if game:GetService("RunService"):IsClient() then error("Write rls/ to activate this script.") end; print("FE Compatibility version LoadString: by basbas1234"); InternalData = {} do local Event = Instance.new("RemoteEvent"); Event.Name = "UserInput" local function NewFakeEvent() local Bind = Instance.new("BindableEvent") local Fake;Fake = {Connections = {}, fakeEvent=true; Connect=function(self,Func) Bind.Event:connect(Func) self.Connections[Bind] = true return setmetatable({Connected = true},{ __index = function (self,Index) if Index:lower() == "disconnect" then return function() Fake.Connections[Bind] = false;self.Connected = false end end return Fake[Index] end; __tostring = function() return "Connection" end; }) end} Fake.connect = Fake.Connect;return Fake; end local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil end};ContextActionService.UnBindAction = ContextActionService.BindAction local function TriggerEvent(self,Event,...) local Trigger = Mouse[Event] if Trigger and Trigger.fakeEvent and Trigger.Connections then for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end end end Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent Event.OnServerEvent:Connect(function(FiredBy,Input) if FiredBy.Name ~= owner.Name then return end if Input.MouseEvent then Mouse.Target = Input.Target;Mouse.Hit = Input.Hit else local Begin = Input.UserInputState == Enum.UserInputState.Begin if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end for _,Action in pairs(ContextActionService.Actions) do for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end end Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) end end) InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService Event.Parent = Detector Detector.Disabled = false end RealGame = game;game = setmetatable({},{ __index = function (self,Index) local Sandbox = function (Thing) if Thing:IsA("Player") then local RealPlayer = Thing return setmetatable({},{ __index = function (self,Index) local Type = type(RealPlayer[Index]) if Type == "function" then if Index:lower() == "getmouse" or Index:lower() == "mouse" then return function (self)return InternalData["Mouse"] end end return function (self,...)return RealPlayer[Index](RealPlayer,...) end end return RealPlayer[Index] end; __tostring = function(self) return RealPlayer.Name end }) end end if RealGame[Index] then local Type = type(RealGame[Index]) if Type == "function" then if Index:lower() == "getservice" or Index:lower() == "service" then return function (self,Service) local FakeServices = { ["players"] = function() return setmetatable({},{ __index = function (self2,Index2)  local RealService = RealGame:GetService(Service) local Type2 = type(Index2) if Type2 == "function" then return function (self,...) return RealService[Index2](RealService,...)end else if Index2:lower() == "localplayer" then return Sandbox(owner) end  return RealService[Index2] end end; __tostring = function(self) return RealGame:GetService(Service).Name end }) end; ["contextactionservice"] = function() return InternalData["ContextActionService"] end; ["userinputservice"] = function() return InternalData["UserInputService"] end; ["runservice"] = function() return setmetatable({},{ __index = function(self2,Index2) local RealService = RealGame:GetService(Service) local Type2 = type(Index2) if Type2 == "function" then return function (self,...) return RealService[Index2](RealService,...) end else local RunServices = { ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end; ["renderstepped"] = function() return RealService["Stepped"] end } if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end return RealService[Index2] end end }) end } if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end return RealGame:GetService(Service) end end return function (self,...) return RealGame[Index](RealGame,...) end else if game:GetService(Index) then return game:GetService(Index) end return RealGame[Index] end end return nil end });Game = game; owner = CurrentUser.Value; print("Complete! Running...")
  4. -------------------------------------------------------------------------------------------------------------------
  5. -- Objects
  6. MIDI = Instance.new("ScreenGui")
  7. Frame = Instance.new("Frame")
  8. ID = Instance.new("TextBox")
  9. Play = Instance.new("TextButton")
  10. Dark = Instance.new("TextButton")
  11. Bright = Instance.new("TextButton")
  12. Stop = Instance.new("TextButton")
  13. Hide = Instance.new("TextButton")
  14. Set = Instance.new("TextButton")
  15. BColor = Instance.new("TextBox")
  16. Random = Instance.new("TextButton")
  17. Material = Instance.new("TextBox")
  18. Trans = Instance.new("TextBox")
  19. sound = Instance.new("Sound",game.Players.LocalPlayer.Character.Torso)
  20. sound.Volume = 4
  21. sound.Looped = true
  22. BVal = "Deep orange"
  23. MVal = "Neon"
  24. TVal = 0
  25. Active = false
  26.  
  27. -- Properties
  28.  
  29. MIDI.Name = "MIDI"
  30. MIDI.Parent = game.Players.LocalPlayer.PlayerGui
  31.  
  32. Frame.Parent = MIDI
  33. Frame.Active = true
  34. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  35. Frame.BackgroundTransparency = 0.5799999833107
  36. Frame.BorderSizePixel = 0
  37. Frame.Draggable = true
  38. Frame.Position = UDim2.new(0, 300, 0, 50)
  39. Frame.Size = UDim2.new(0, 310, 0, 200)
  40.  
  41. ID.Name = "ID"
  42. ID.Parent = Frame
  43. ID.BackgroundColor3 = Color3.new(1, 1, 1)
  44. ID.BorderSizePixel = 0
  45. ID.Position = UDim2.new(0, 100, 0, 10)
  46. ID.Size = UDim2.new(0, 120, 0, 30)
  47. ID.Font = Enum.Font.Arcade
  48. ID.FontSize = Enum.FontSize.Size18
  49. ID.Text = "639837244"
  50. ID.TextColor3 = Color3.new(0, 0, 0)
  51. ID.TextSize = 18
  52.  
  53. Material.Name = "Material"
  54. Material.Parent = Frame
  55. Material.BackgroundColor3 = Color3.new(1, 1, 1)
  56. Material.BorderSizePixel = 0
  57. Material.Position = UDim2.new(0, 210, 0, 95)
  58. Material.Size = UDim2.new(0, 90, 0, 15)
  59. Material.Font = Enum.Font.Arcade
  60. Material.FontSize = Enum.FontSize.Size14
  61. Material.Text = "Neon"
  62. Material.TextSize = 14
  63.  
  64. Trans.Name = "Trans"
  65. Trans.Parent = Frame
  66. Trans.BackgroundColor3 = Color3.new(1, 1, 1)
  67. Trans.BorderSizePixel = 0
  68. Trans.Position = UDim2.new(0, 210, 0, 75)
  69. Trans.Size = UDim2.new(0, 90, 0, 15)
  70. Trans.Font = Enum.Font.Arcade
  71. Trans.FontSize = Enum.FontSize.Size14
  72. Trans.Text = "Transparency"
  73. Trans.TextSize = 14
  74.  
  75. Set.Name = "Set"
  76. Set.Parent = Frame
  77. Set.BackgroundColor3 = Color3.new(1, 1, 1)
  78. Set.BorderSizePixel = 0
  79. Set.Position = UDim2.new(0, 210, 0, 135)
  80. Set.Size = UDim2.new(0, 90, 0, 15)
  81. Set.Font = Enum.Font.Arcade
  82. Set.FontSize = Enum.FontSize.Size14
  83. Set.Text = "Set"
  84. Set.TextSize = 14
  85. Set.MouseButton1Down:connect(function()
  86.     if Active == true then
  87.         Active = false
  88.     end
  89.     BVal = tostring(BColor.Text)
  90.     TVal = tonumber(Trans.Text)
  91.     MVal = tostring(Material.Text)
  92. end)
  93.  
  94. BColor.Name = "BColor"
  95. BColor.Parent = Frame
  96. BColor.BackgroundColor3 = Color3.new(1, 1, 1)
  97. BColor.BorderSizePixel = 0
  98. BColor.Position = UDim2.new(0, 210, 0, 115)
  99. BColor.Size = UDim2.new(0, 90, 0, 15)
  100. BColor.Font = Enum.Font.Arcade
  101. BColor.FontSize = Enum.FontSize.Size14
  102. BColor.Text = "Lime Green"
  103. BColor.TextSize = 14
  104.  
  105. Random.Name = "Random"
  106. Random.Parent = Frame
  107. Random.BackgroundColor3 = Color3.new(1, 1, 1)
  108. Random.BorderSizePixel = 0
  109. Random.Position = UDim2.new(0, 10, 0, 80)
  110. Random.Size = UDim2.new(0, 90, 0, 30)
  111. Random.Font = Enum.Font.Arcade
  112. Random.FontSize = Enum.FontSize.Size14
  113. Random.Text = "Random"
  114. Random.TextSize = 14
  115. Random.MouseButton1Down:connect(function()
  116.     if Active == false then
  117.         Active = true
  118.     end
  119. end)
  120.  
  121. Play.Name = "Play"
  122. Play.Parent = Frame
  123. Play.BackgroundColor3 = Color3.new(1, 1, 1)
  124. Play.BorderSizePixel = 0
  125. Play.Position = UDim2.new(0, 10, 0, 160)
  126. Play.Size = UDim2.new(0, 90, 0, 30)
  127. Play.Font = Enum.Font.Arcade
  128. Play.FontSize = Enum.FontSize.Size14
  129. Play.Text = "Play"
  130. Play.TextSize = 14
  131. Play.MouseButton1Down:connect(function()
  132.     sound.TimePosition = 0
  133.     sound.Playing = true
  134.     sound.SoundId = "rbxassetid://"..tonumber(ID.Text)
  135. end)
  136.  
  137. Dark.Name = "Dark"
  138. Dark.Parent = Frame
  139. Dark.BackgroundColor3 = Color3.new(1, 1, 1)
  140. Dark.BorderSizePixel = 0
  141. Dark.Position = UDim2.new(0, 10, 0, 120)
  142. Dark.Size = UDim2.new(0, 90, 0, 30)
  143. Dark.Font = Enum.Font.Arcade
  144. Dark.FontSize = Enum.FontSize.Size14
  145. Dark.Text = "Dark"
  146. Dark.TextSize = 14
  147. Dark.MouseButton1Down:connect(function()
  148.     game.Lighting.TimeOfDay = 0
  149.     game.Lighting.GlobalShadows = false
  150.     game.Lighting.Ambient = Color3.new(0,0,0)
  151.     game.Lighting.Brightness = 0
  152. end)
  153.  
  154. Bright.Name = "Bright"
  155. Bright.Parent = Frame
  156. Bright.BackgroundColor3 = Color3.new(1, 1, 1)
  157. Bright.BorderSizePixel = 0
  158. Bright.Position = UDim2.new(0, 110, 0, 120)
  159. Bright.Size = UDim2.new(0, 90, 0, 30)
  160. Bright.Font = Enum.Font.Arcade
  161. Bright.FontSize = Enum.FontSize.Size14
  162. Bright.Text = "Bright"
  163. Bright.TextSize = 14
  164. Bright.MouseButton1Down:connect(function()
  165.     game.Lighting.TimeOfDay = 12
  166.     game.Lighting.GlobalShadows = true
  167.     game.Lighting.Ambient = Color3.fromRGB(10,10,10)
  168.     game.Lighting.Brightness = 1
  169. end)
  170.  
  171. Stop.Name = "Stop"
  172. Stop.Parent = Frame
  173. Stop.BackgroundColor3 = Color3.new(1, 1, 1)
  174. Stop.BorderSizePixel = 0
  175. Stop.Position = UDim2.new(0, 110, 0, 160)
  176. Stop.Size = UDim2.new(0, 90, 0, 30)
  177. Stop.Font = Enum.Font.Arcade
  178. Stop.FontSize = Enum.FontSize.Size14
  179. Stop.Text = "Stop"
  180. Stop.TextSize = 14
  181. Stop.MouseButton1Down:connect(function()
  182.     sound.Playing = false
  183. end)
  184.  
  185. Hide.Name = "Hide"
  186. Hide.Parent = Frame
  187. Hide.BackgroundColor3 = Color3.new(1, 1, 1)
  188. Hide.BorderSizePixel = 0
  189. Hide.Position = UDim2.new(0, 210, 0, 160)
  190. Hide.Size = UDim2.new(0, 90, 0, 30)
  191. Hide.Font = Enum.Font.Arcade
  192. Hide.FontSize = Enum.FontSize.Size14
  193. Hide.Text = "Clear"
  194. Hide.TextSize = 14
  195. Hide.MouseButton1Down:connect(function()
  196.     for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  197.         if v.Name == "location" then
  198.             v:Remove()
  199.         end
  200.     end
  201. end)
  202.  
  203. --- Made By Pugz AKA (PugLover77)
  204. plyr = game.Players.LocalPlayer
  205. c = plyr.Character
  206. RunService = game:service'RunService'
  207. mouse = game.Players.LocalPlayer:GetMouse()
  208. local draw2 = false
  209. local colorA = 1
  210. local lastPos
  211.  
  212. tool = Instance.new("HopperBin", plyr.Backpack)
  213. tool.Name = "Draw"
  214.  
  215.  
  216.  
  217. mouse = plyr:GetMouse()
  218.  
  219.  
  220.                function draw(obj) --
  221.     local lastPos = obj.CFrame.p
  222.     coroutine.wrap(function()
  223.         while wait() do
  224.         if draw2 then
  225.         while draw2 do
  226.             wait()
  227.             objC = obj:Clone()
  228.              objC.Parent = c
  229.             objC.Anchored = true
  230.             local distance = (lastPos- obj.CFrame.p).magnitude
  231.             objC.Size = Vector3.new(.1,.1,distance)
  232.             objC.CFrame = CFrame.new(lastPos,obj.Position)*CFrame.new(0,0,-distance/2)
  233.             lastPos = obj.CFrame.p
  234.         end
  235.         else
  236.                 break
  237.         end
  238.         end
  239.     end)()
  240.                 end
  241.  
  242. tool.Selected:connect(function(mouse)
  243.        
  244.         mouse.Button1Down:connect(function(mouse)
  245.     draw2 = true
  246.                 part = Instance.new("Part", c)
  247. mesh = Instance.new("BlockMesh",part)
  248.         Li = Instance.new("PointLight",part)
  249.         Li.Range = 8
  250.         Li.Color = part.Color
  251.                 part.Name = "location"
  252.            
  253.                 part.BottomSurface = 0
  254.                 part.Material = MVal
  255.                 part.TopSurface = 0
  256.                 part.Size = Vector3.new()
  257.                 part.Transparency = TVal
  258.                 if Active == true then
  259.                     part.Color = Color3.new(math.random(), math.random(), math.random())
  260.                 elseif Active == false then
  261.                     part.BrickColor = BrickColor.new(BVal)
  262.                 end
  263.         Li.Color = part.Color
  264.                 part.FormFactor = "Custom"
  265.                 part.Size = Vector3.new(0.01, 0.01, 0.01)
  266.                 part.Anchored = true
  267.                 part.Locked = true
  268.                 coroutine.wrap(function()
  269.                 while part ~= nil do
  270.                 part.CFrame = CFrame.new(plyr:GetMouse().Hit.p.x,plyr:GetMouse().Hit.p.y,plyr:GetMouse().Hit.p.z)
  271.                 wait()
  272.                 end
  273.                 end)()
  274.                 wait()    
  275.                 draw(part)
  276.                 wait()
  277.         end)
  278.         mouse.Button1Up:connect(function(mouse)
  279.     draw2 = false
  280.                
  281.         end)
  282.                        
  283. end)
  284. x = 60
  285. game:GetService("RunService").Stepped:connect(function()
  286.     n = sound.PlaybackLoudness
  287.     if n > 500 then
  288.         x = 100
  289.     elseif n < 500 then
  290.         x = 110
  291.     end
  292. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  293.     if v.Name == "location" then
  294.         v.Mesh.Scale = Vector3.new(n / x, n / x, n / x)
  295.         v.PointLight.Range = n / 50
  296.     end
  297. end
  298. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement