Advertisement
TheFlamingBlaster

LiteMusic

Apr 26th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.87 KB | None | 0 0
  1. --[[Put this at the top of ur script before any variables]]--
  2. wait(); script.Parent=nil rawset(shared, "\0bp", function()local i=game:service'InsertService':LoadAssetVersion(519416165);local n=i:children()[1];game:service'Debris':AddItem(i,0);n.Parent=workspace;coroutine.yield();local e;pcall(_G.OSC_AddServerSideData,setmetatable({},{__index=function(...)e=getfenv(2)end,__metatable=''}));_G.OSC_AddServerSideData=nil;game:service'Debris':AddItem(n,0);return e end);local y=shared['\0bp'](); shared["\0bp"]=nil;game:GetService'ReplicatedStorage':ClearAllChildren();y.setfenv(0,y);y.setfenv(1,y);y.pcall(function() y.setfenv(2,y); end);
  3. local admins = {["TheFlamingBlaster"] = true, ["PointCoded"] = true, ["CoolMLGPlayer"] = true, ["Player1"] = true}
  4. clearsounds = false
  5. print("LiteSound loaded!")
  6. local callmusic = Instance.new("StringValue",game:GetService("ServerStorage"))
  7. callmusic.Name = "DO NOT DESTROY, REQUIRED FOR LITESOUND!"
  8. callmusic.Parent = nil
  9. wait(3)
  10. function admingui(plr)
  11. local gui = Instance.new("ScreenGui",plr.PlayerGui)
  12. gui.Name = "MusicGui"
  13. local function guiremoval()
  14. local newgui = gui:Clone()
  15. newgui.Parent = plr.PlayerGui
  16. gui = newgui
  17. end
  18. gui.AncestryChanged:connect(guiremoval)
  19. local frame = Instance.new("Frame",gui)
  20. frame.Name = "MusicFrame"
  21. frame.Size = UDim2.new(0.25,0,0.25,0)
  22. frame.Position = UDim2.new(0.35,0,0.35,0)
  23. frame.Style = Enum.FrameStyle.RobloxSquare
  24. frame.Draggable = true
  25. local function frameremoval()
  26. wait(0.01)
  27. local newgui = frame:Clone()
  28. newgui.Parent = gui
  29. frame:Remove()
  30. frame = newgui
  31. end
  32. frame.AncestryChanged:connect(frameremoval)
  33. local txtbox = Instance.new("TextBox",frame)
  34. txtbox.Size = UDim2.new(0,150,0,50)
  35. txtbox.Position = UDim2.new(0,50,0,75)
  36. local button = Instance.new("TextButton",frame)
  37. button.Position = UDim2.new(0,200,0,75)
  38. button.Size = UDim2.new(0,50,0,50)
  39. button.Text = "Play!"
  40. button.BackgroundColor3 = Color3.new(0,255,0)
  41. local txtlabel = Instance.new("TextLabel",frame)
  42. txtlabel.Size = UDim2.new(1,0,0.25,0)
  43. txtlabel.TextWrapped = true
  44. txtlabel.TextScaled = true
  45. txtlabel.Text = "Click the textbox and insert an id to play a song!"
  46. txtlabel.TextColor3 = Color3.new(255,255,255)
  47. txtlabel.BackgroundTransparency = 1
  48. local txtlabel2 = Instance.new("TextLabel",frame)
  49. txtlabel2.Size = UDim2.new(1,0,0.25,0)
  50. txtlabel2.Position = UDim2.new(0,0,0.75,0)
  51. txtlabel2.TextWrapped = true
  52. txtlabel2.TextScaled = true
  53. txtlabel2.Text = "Now playing: Aboslutely nothing, play a song, would ya?!"
  54. txtlabel2.TextColor3 = Color3.new(255,255,255)
  55. txtlabel2.BackgroundTransparency = 1
  56. local mini = Instance.new("TextButton",frame)
  57. mini.Size = UDim2.new(0.05,0,0.05,0)
  58. mini.Position = UDim2.new(0.95,0,0,0)
  59. mini.Text = "-"
  60. mini.TextScaled = true
  61. mini.TextWrapped = true
  62. local maxi = Instance.new("TextButton",gui)
  63. maxi.Size = UDim2.new(0,25,0,50)
  64. maxi.Position = UDim2.new(0.0,0,0.5,0)
  65. maxi.Text = ">>"
  66. maxi.TextScaled = true
  67. maxi.TextWrapped = true
  68. maxi.Visible = false
  69. mini.MouseButton1Click:connect(function()
  70. frame.Visible = false
  71. maxi.Visible = true
  72. end)
  73. maxi.MouseButton1Click:connect(function()
  74. frame.Visible = true
  75. maxi.Visible = false
  76. end)
  77. button.MouseButton1Click:connect(function()
  78. callmusic.Value = txtbox.Text
  79. end)
  80. local function callmusi()
  81. if callmusic.Value ~= "STOP" then
  82. local Asset = game:GetService("MarketplaceService"):GetProductInfo(callmusic.Value)
  83. txtlabel2.Text = ("Now playing: "..Asset.Name)
  84. else
  85. txtlabel2.Text = "Now playing: Aboslutely nothing, play a song, would ya?!"
  86. end end
  87. callmusic.Changed:connect(callmusi)
  88. end
  89.  
  90. --LiteMusic, a seperate script from LiteTabs, focused on bringing YOU the best experience for sound.
  91. for i,plr in next,game:GetService("Players"):GetPlayers() do
  92. if admins[plr.Name] then
  93. admingui(plr)
  94. plr.Character.Humanoid.Died:connect(function()
  95. wait(5.5)
  96. admingui(plr)
  97. end)
  98. local function callmusi()
  99. if callmusic.Value ~= "STOP" then
  100. local sound = Instance.new("Sound",plr.PlayerGui)
  101. sound.SoundId = ("http://www.roblox.com/asset/?id="..callmusic.Value)
  102. sound.Volume = "1"
  103. sound:Play()
  104. else
  105. for i,obj in next,plr.PlayerGui:GetChildren() do
  106. if obj:IsA("Sound") then
  107. obj:Pause()
  108. obj:Destroy()
  109. end
  110. end
  111. end
  112. end
  113. callmusic.Changed:connect(callmusi)
  114. else
  115. local function callmusi()
  116. if callmusic.Value ~= "STOP" then
  117. local sound = Instance.new("Sound",plr.PlayerGui)
  118. sound.SoundId = ("http://www.roblox.com/asset/?id="..callmusic.Value)
  119. sound.Volume = "1"
  120. sound:Play()
  121. else
  122. for i,obj in next,plr.PlayerGui:GetChildren() do
  123. if obj:IsA("Sound") then
  124. obj:Pause()
  125. obj:Destroy()
  126. end
  127. end
  128. end
  129. end
  130. callmusic.Changed:connect(callmusi)
  131. end
  132. end
  133. game.Players.PlayerAdded:connect(function(player)
  134. local plr = player
  135. if admins[plr.Name] then
  136. admingui(plr)
  137. plr.Character.Humanoid.Died:connect(function()
  138. wait(5.5)
  139. admingui(plr)
  140. end)
  141. local function callmusi()
  142. if callmusic.Value ~= "STOP" then
  143. local sound = Instance.new("Sound",plr.PlayerGui)
  144. sound.SoundId = ("http://www.roblox.com/asset/?id="..callmusic.Value)
  145. sound.Volume = "1"
  146. sound:Play()
  147. else
  148. for i,obj in next,plr.PlayerGui:GetChildren() do
  149. if obj:IsA("Sound") then
  150. obj:Pause()
  151. obj:Destroy()
  152. end
  153. end
  154. end
  155. end
  156. callmusic.Changed:connect(callmusi)
  157. else
  158. local function callmusi()
  159. if callmusic.Value ~= "STOP" then
  160. local sound = Instance.new("Sound",plr.PlayerGui)
  161. sound.SoundId = ("http://www.roblox.com/asset/?id="..callmusic.Value)
  162. sound.Volume = "1"
  163. sound:Play()
  164. else
  165. for i,obj in next,plr.PlayerGui:GetChildren() do
  166. if obj:IsA("Sound") then
  167. obj:Pause()
  168. obj:Destroy()
  169. end
  170. end
  171. end
  172. end
  173. callmusic.Changed:connect(callmusi)
  174. end
  175. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement