Basykung7845

chill

Feb 27th, 2019
317
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by Basykung7845
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Basykung7845")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. -- define player variable
  88. local Player=owner
  89.  
  90. -- appearance
  91. col=Color3.fromRGB(255, 255, 0) -- blue color
  92. font=Enum.Font.SciFi
  93. style="Fade"
  94.  
  95. -- creation of gui
  96. local scrg=Instance.new("ScreenGui",Player.PlayerGui)
  97. local credit=Instance.new("TextLabel",scrg)
  98. credit.BackgroundColor3=Color3.fromRGB(255, 170, 0)
  99. credit.BackgroundTransparency=1
  100. credit.Position=UDim2.new(0,0,1,-18)
  101. credit.Size=UDim2.new(1,0,0,18)
  102. credit.Font=font
  103. credit.FontSize=Enum.FontSize.Size18
  104. credit.Text="More SCRIPTS by adchand2 available at: http://pastebin.com/u/memesbruh03"
  105. credit.TextColor3=Color3.fromRGB(255,255,255)
  106. credit.TextScaled=true
  107. credit.TextStrokeTransparency=0.5
  108. credit.TextWrapped=true
  109. credit.TextXAlignment=Enum.TextXAlignment.Left
  110. local title=Instance.new("TextLabel",scrg)
  111. title.BackgroundTransparency=1
  112. title.FontSize=Enum.FontSize.Size60
  113. title.Font=font
  114. title.Size=UDim2.new(1,0,0.25)
  115. title.TextColor3=col
  116. title.TextStrokeTransparency=0.5
  117. title.Text="adchand2's Music Player GUI v1.4.0"
  118. local main=Instance.new("Frame",scrg)
  119. main.BackgroundColor3=Color3.fromRGB(0,0,0)
  120. main.BackgroundTransparency=0.5
  121. main.BorderColor3=col
  122. main.BorderSizePixel=5
  123. main.Position=UDim2.new(0,0,0.5,-100)
  124. main.Size=UDim2.new(0,400,0,90)
  125. main.Selectable=true
  126. main.Draggable=true
  127. local loopcol=Instance.new("Frame",main)
  128. loopcol.BackgroundTransparency=1
  129. loopcol.Size=UDim2.new(1,0,0.2,0)
  130. local ltitle=Instance.new("TextLabel",loopcol)
  131. ltitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  132. ltitle.BackgroundTransparency=1
  133. ltitle.Size=UDim2.new(1,0,1,0)
  134. ltitle.Font=font
  135. ltitle.FontSize=Enum.FontSize.Size18
  136. ltitle.Text="Looped"
  137. ltitle.TextColor3=col
  138. ltitle.TextXAlignment=Enum.TextXAlignment.Left
  139. ltitle.Active=false
  140. local ltrue=Instance.new("TextButton",loopcol)
  141. ltrue.BackgroundColor3=Color3.fromRGB(0,0,0)
  142. ltrue.BackgroundTransparency=0.5
  143. ltrue.BorderSizePixel=0
  144. ltrue.Position=UDim2.new(0.5,0,0,0)
  145. ltrue.Size=UDim2.new(0.25,0,1,0)
  146. ltrue.Font=font
  147. ltrue.FontSize=Enum.FontSize.Size18
  148. ltrue.Text="true"
  149. ltrue.TextColor3=Color3.fromRGB(255,255,255)
  150. local lfalse=Instance.new("TextButton",loopcol)
  151. lfalse.Name="TextButton2"
  152. lfalse.BackgroundColor3=Color3.fromRGB(0,0,0)
  153. lfalse.BackgroundTransparency=0.5
  154. lfalse.BorderSizePixel=0
  155. lfalse.Position=UDim2.new(0.75,0,0,0)
  156. lfalse.Size=UDim2.new(0.25,0,1,0)
  157. lfalse.Font=font
  158. lfalse.FontSize=Enum.FontSize.Size18
  159. lfalse.Text="false"
  160. lfalse.TextColor3=Color3.fromRGB(255,255,255)
  161. local pscol=Instance.new("Frame",main)
  162. pscol.Name="Frame2"
  163. pscol.BackgroundTransparency=1
  164. pscol.Position=UDim2.new(0,0,0.2,0)
  165. pscol.Size=UDim2.new(1,0,0.2,0)
  166. local pstitle=Instance.new("TextLabel",pscol)
  167. pstitle.BackgroundTransparency=1
  168. pstitle.Size=UDim2.new(1,0,1,0)
  169. pstitle.Font=font
  170. pstitle.FontSize=Enum.FontSize.Size18
  171. pstitle.Text="PlaybackSpeed"
  172. pstitle.TextColor3=col
  173. pstitle.TextXAlignment=Enum.TextXAlignment.Left
  174. pstitle.Active=false
  175. local psfield=Instance.new("TextBox",pscol)
  176. psfield.BackgroundColor3=Color3.fromRGB(0,0,0)
  177. psfield.BackgroundTransparency=0.5
  178. psfield.BorderSizePixel=0
  179. psfield.Position=UDim2.new(0.5,0,0,0)
  180. psfield.Size=UDim2.new(0.5,0,1,0)
  181. psfield.Font=font
  182. psfield.FontSize=Enum.FontSize.Size18
  183. psfield.Text="Input Here"
  184. psfield.TextColor3=Color3.fromRGB(255,255,255)
  185. psfield.TextScaled=true
  186. local sidcol=Instance.new("Frame",main)
  187. sidcol.Name="Frame3"
  188. sidcol.BackgroundTransparency=1
  189. sidcol.Position=UDim2.new(0,0,0.4,0)
  190. sidcol.Size=UDim2.new(1,0,0.2,0)
  191. local sidtitle=Instance.new("TextLabel",sidcol)
  192. sidtitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  193. sidtitle.BackgroundTransparency=1
  194. sidtitle.Size=UDim2.new(1,0,1,0)
  195. sidtitle.Font=font
  196. sidtitle.FontSize=Enum.FontSize.Size18
  197. sidtitle.Text="SoundId"
  198. sidtitle.TextColor3=col
  199. sidtitle.TextXAlignment=Enum.TextXAlignment.Left
  200. sidtitle.Active=false
  201. local sidfield=Instance.new("TextBox",sidcol)
  202. sidfield.BackgroundColor3=Color3.fromRGB(0,0,0)
  203. sidfield.BackgroundTransparency=0.5
  204. sidfield.BorderSizePixel=0
  205. sidfield.Position=UDim2.new(0.5,0,0,0)
  206. sidfield.Size=UDim2.new(0.5,0,1,0)
  207. sidfield.Font=font
  208. sidfield.FontSize=Enum.FontSize.Size18
  209. sidfield.Text="Input Here"
  210. sidfield.TextColor3=Color3.fromRGB(255,255,255)
  211. sidfield.TextScaled=true
  212. local volucol=Instance.new("Frame",main)
  213. volucol.Name="Frame4"
  214. volucol.BackgroundColor3=Color3.new(1,1,1)
  215. volucol.BackgroundTransparency=1
  216. volucol.Position=UDim2.new(0,0,0.6,0)
  217. volucol.Size=UDim2.new(1,0,0.2,0)
  218. local volutitle=Instance.new("TextLabel",volucol)
  219. volutitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  220. volutitle.BackgroundTransparency=1
  221. volutitle.Size=UDim2.new(1,0,1,0)
  222. volutitle.Font=font
  223. volutitle.FontSize=Enum.FontSize.Size18
  224. volutitle.Text="Volume"
  225. volutitle.TextColor3=col
  226. volutitle.TextXAlignment=Enum.TextXAlignment.Left
  227. volutitle.Active=false
  228. local volufield= Instance.new("TextBox",volucol)
  229. volufield.BackgroundColor3=Color3.fromRGB(0,0,0)
  230. volufield.BackgroundTransparency=0.5
  231. volufield.BorderSizePixel=0
  232. volufield.Position=UDim2.new(0.5,0,0,0)
  233. volufield.Size=UDim2.new(0.5,0,1,0)
  234. volufield.Font=font
  235. volufield.FontSize=Enum.FontSize.Size18
  236. volufield.Text="Input Here"
  237. volufield.TextColor3=Color3.fromRGB(255,255,255)
  238. volufield.TextScaled=true
  239. local control=Instance.new("Frame",main)
  240. control.Name="Frame5"
  241. control.BackgroundColor3=Color3.fromRGB(255,255,255)
  242. control.BackgroundTransparency=1
  243. control.Position=UDim2.new(0,0,0.8,0)
  244. control.Size=UDim2.new(1,0,0.2,0)
  245. local pleh1=Instance.new("TextButton",control)
  246. pleh1.BackgroundColor3=Color3.fromRGB(0,0,0)
  247. pleh1.BackgroundTransparency=0.5
  248. pleh1.BorderSizePixel=0
  249. pleh1.Size=UDim2.new(0.25,0,1,0)
  250. pleh1.Font=font
  251. pleh1.FontSize=Enum.FontSize.Size18
  252. pleh1.Text="Play Music"
  253. pleh1.TextColor3=Color3.fromRGB(255,255,255)
  254. local pleh2=Instance.new("TextButton",control)
  255. pleh2.BackgroundColor3=Color3.fromRGB(0,0,0)
  256. pleh2.BackgroundTransparency=0.5
  257. pleh2.BorderSizePixel=0
  258. pleh2.Position=UDim2.new(0.25,0,0,0)
  259. pleh2.Size=UDim2.new(0.25,0,1,0)
  260. pleh2.Font=font
  261. pleh2.FontSize=Enum.FontSize.Size18
  262. pleh2.Text="Play # Music"
  263. pleh2.TextColor3=Color3.fromRGB(255,255,255)
  264. local stahp=Instance.new("TextButton",control)
  265. stahp.Name="TextButton2"
  266. stahp.BackgroundColor3=Color3.fromRGB(0,0,0)
  267. stahp.BackgroundTransparency=0.5
  268. stahp.BorderSizePixel=0
  269. stahp.Position=UDim2.new(0.5, 0, 0, 0)
  270. stahp.Size=UDim2.new(0.5, 0, 1, 0)
  271. stahp.Font=font
  272. stahp.FontSize=Enum.FontSize.Size18
  273. stahp.Text="Stop Music"
  274. stahp.TextColor3=Color3.fromRGB(255,255,255)
  275. -- yay! creation is finished!
  276. -- but wait... ...there's more...
  277.  
  278.  
  279. -- this is the fun part...
  280.  
  281. -- define looped variable
  282. looped=true
  283.  
  284. function create()
  285. local sound=Instance.new("Sound",workspace)
  286. sound.Name="MusicGUIsong"
  287. end
  288.  
  289. function del()
  290. if workspace.MusicGUIsong.IsPlaying==true then
  291. workspace.MusicGUIsong:Destroy()
  292. end
  293. end
  294.  
  295. function informii()
  296. --[[local doublecheckplayer=owner
  297. local wp=workspace:findFirstChild(doublecheckplayer)
  298. local hed=wp.Head
  299. local b=Instance.new("BillboardGui",hed)
  300. b.StudsOffset=Vector3.new(0,4,0)
  301. b.Size=UDim2.new(18,0,4,0)
  302. b.Adornee=hed
  303. local t=Instance.new("TextLabel",b)
  304. t.BackgroundTransparency=1
  305. t.TextColor3=col]]
  306. --t.Text=[[SoundId playing: ]]..sidfield.Text..[[
  307. --PlaybackSpeed: ]]..psfield.Text..[[
  308. --Volume: ]]..volufield.Text
  309. --[[t.Font=font
  310. t.Size=UDim2.new(1,0,1,0) -- keeping this here in case I want to use it again
  311. t.TextScaled=true
  312. wait(5)
  313. t:Destroy()]]
  314. local h=Instance.new("Hint",workspace)
  315. h.Text="SoundId playing: "..sidfield.Text.." - PlaybackSpeed: "..psfield.Text.." - Volume: "..volufield.Text
  316. wait(5)
  317. h:Destroy()
  318. end
  319.  
  320. function custom(texts) -- custom notification
  321. local wp=workspace:FindFirstChild(Player.Name)
  322. local hed=wp.Head
  323. local b=Instance.new("BillboardGui",hed)
  324. b.StudsOffset=Vector3.new(0,4,0)
  325. b.Size=UDim2.new(18,0,6,0)
  326. b.Adornee=hed
  327. local t=Instance.new("TextLabel",b)
  328. t.BackgroundTransparency=1
  329. t.TextColor3=col
  330. t.Text=texts
  331. t.Font=font
  332. t.Size=UDim2.new(1,0,1,0)
  333. t.TextScaled=true
  334. wait(5)
  335. repeat
  336. wait(0.05)
  337. t.TextTransparency=t.TextTransparency+0.1
  338. until
  339. t.TextTransparency==1
  340. t:Destroy()
  341. end
  342.  
  343. function makesound(id)
  344. local s=Instance.new("Sound",main)
  345. s.SoundId=id
  346. s.Volume=1
  347. s.PlaybackSpeed=1
  348. s:Play()
  349. end
  350.  
  351. ltrue.MouseButton1Click:connect(function()
  352. looped=true
  353. end)
  354. lfalse.MouseButton1Click:connect(function()
  355. looped=false
  356. end)
  357. pleh1.MouseButton1Click:connect(function()
  358. create()
  359. workspace.MusicGUIsong.Looped=looped
  360. workspace.MusicGUIsong.PlaybackSpeed=psfield.Text
  361. workspace.MusicGUIsong.SoundId="rbxassetid://"..sidfield.Text
  362. workspace.MusicGUIsong.Volume=volufield.Text
  363. workspace.MusicGUIsong:Play()
  364. informii()
  365. end)
  366. pleh2.MouseButton1Click:connect(function()
  367. create()
  368. workspace.MusicGUIsong.Looped=looped
  369. workspace.MusicGUIsong.PlaybackSpeed=psfield.Text
  370. workspace.MusicGUIsong.SoundId="http://www.roblox.com/asset/?hash="..sidfield.Text
  371. workspace.MusicGUIsong.Volume=volufield.Text
  372. workspace.MusicGUIsong:Play()
  373. informii()
  374. end)
  375. stahp.MouseButton1Click:connect(function()
  376. del()
  377. end)
  378.  
  379. -- sounds
  380.  
  381. ltrue.MouseButton1Click:connect(function()
  382. makesound("rbxassetid://156785206")
  383. end)
  384.  
  385. lfalse.MouseButton1Click:connect(function()
  386. makesound("rbxassetid://156785206")
  387. end)
  388.  
  389. psfield.SelectionGained:connect(function()
  390. makesound("rbxassetid://156785206")
  391. end)
  392.  
  393. psfield.Changed:connect(function()
  394. makesound("rbxassetid://215658476")
  395. end)
  396.  
  397. sidfield.SelectionGained:connect(function()
  398. makesound("rbxassetid://156785206")
  399. end)
  400.  
  401. sidfield.Changed:connect(function()
  402. makesound("rbxassetid://215658476")
  403. end)
  404.  
  405. volufield.SelectionGained:connect(function()
  406. makesound("rbxassetid://156785206")
  407. end)
  408.  
  409. volufield.Changed:connect(function()
  410. makesound("rbxassetid://215658476")
  411. end)
  412.  
  413. pleh1.MouseButton1Click:connect(function()
  414. makesound("rbxassetid://156785206")
  415. end)
  416.  
  417. pleh2.MouseButton1Click:connect(function()
  418. makesound("rbxassetid://156785206")
  419. end)
  420.  
  421. stahp.MouseButton1Click:connect(function()
  422. makesound("rbxassetid://156785206")
  423. end)
  424.  
  425. -- title fade after 3 seconds
  426.  
  427. wait(3)
  428. if style=="Fade" then
  429. repeat
  430. wait(0.05)
  431. title.TextTransparency=title.TextTransparency+0.01
  432. title.TextStrokeTransparency=title.TextStrokeTransparency+0.005
  433. until
  434. title.TextTransparency>=1 and title.TextStrokeTransparency>=1
  435. title:Destroy()
  436. elseif style=="Shrink" then
  437. repeat
  438. wait(0.05)
  439. title.TextSize=title.TextSize-1
  440. until
  441. title.TextSize==1
  442. title:Destroy()
  443. elseif style=="Hide" then
  444. title:TweenPosition(UDim2.new(0,0,-1,0),"In","Back",1)
  445. wait(1)
  446. title:Destroy()
  447. else
  448. print([[style "]]..style..[[" is invalid, returning "Fade"]])
  449. repeat
  450. wait(0.05)
  451. title.TextTransparency=title.TextTransparency+0.01
  452. title.TextStrokeTransparency=title.TextStrokeTransparency+0.005
  453. until
  454. title.TextTransparency>=1 and title.TextStrokeTransparency>=1
  455. title:Destroy()
  456. end
  457.  
  458. custom("refrop music player 1.4.0 is now prepared")
  459. print("refrop music player 1.4.0 is at the end!")
  460. print(_vegetto.." vegetto version!")
RAW Paste Data