Advertisement
Upscalefanatic3

[FE] Golden Radio (Voidacity)

Jan 19th, 2020 (edited)
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2.  
  3. local Player,game,owner,char, me = owner,game
  4.  
  5. local RealPlayer = Player
  6.  
  7. do print("FE Compatibility code V3 by Desered_ROBLOX")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  8.  
  9.  
  10.  
  11. -- GPlayr by ModernLukest. Made for v3rmillion, , etc.
  12. -- Note that anyone can hear the music that you play. Just a clarification for what LocalScripts can do.
  13.  
  14. local char = game.Players.LocalPlayer.Character
  15. local me = game.Players.LocalPlayer
  16.  
  17.  
  18. -- CREATING BUTTONS, LABELS, FRAMES, ETC.
  19. local gui = Instance.new("ScreenGui", me.PlayerGui) -- CoreGui is buggy, since GPlayr is designed for PlayerGuis, not CoreGuis.
  20. local openbtn = Instance.new("TextButton", gui)
  21. local closebtn = Instance.new("TextButton", gui)
  22. local openguibtn = Instance.new("TextButton", gui)
  23. local playmusicint = Instance.new("Frame", gui)
  24. local playmusicbtn = Instance.new("ImageButton", playmusicint)
  25. local stopmusicbtn = Instance.new("ImageButton", playmusicint)
  26. local musicidbox = Instance.new("TextBox", playmusicint)
  27. local credit = Instance.new("TextLabel", playmusicint)
  28. local title = Instance.new("TextLabel", playmusicint)
  29.  
  30. -- SIZING --
  31.  
  32. openbtn.Size = UDim2.new(0, 100, 0, 50)
  33. closebtn.Size = UDim2.new(0, 100, 0, 50)
  34. openguibtn.Size = UDim2.new(0, 100, 0, 50)
  35. playmusicbtn.Size = UDim2.new(0, 50, 0, 50)
  36. stopmusicbtn.Size = UDim2.new(0, 57, 0, 57)
  37. musicidbox.Size = UDim2.new(0, 300, 0, 50)
  38. credit.Size = UDim2.new(0, 300, 0, 20)
  39. title.Size = UDim2.new(0, 300, 0, 30)
  40. playmusicint.Size = UDim2.new(0, 300, 0, 500)
  41.  
  42. -- POSITIONING --
  43.  
  44. openbtn.Position = UDim2.new(0, 0, 0, 510)
  45. closebtn.Position = UDim2.new(0, 0, 0, 510)
  46. openguibtn.Position = UDim2.new(0, 0, 0, 590)
  47. playmusicbtn.Position = UDim2.new(0, 50, 0, 200)
  48. stopmusicbtn.Position = UDim2.new(0, 175, 0, 197)
  49. musicidbox.Position = UDim2.new(0, 0, 0, 100)
  50. credit.Position = UDim2.new(0, 0, 0, 470)
  51. title.Position = UDim2.new(0, 0, 0, 0)
  52. playmusicint.Position = UDim2.new(0, 200, 0, 100)
  53.  
  54. -- SET TEXT --
  55.  
  56. title.Text = "GPlayr (BETA)"
  57. credit.Text = "GPlayr & radio scripting by Developer / ModernLukest"
  58. musicidbox.Text = "Enter Sound ID Here"
  59. openbtn.Text = "Take Out Radio"
  60. closebtn.Text = "Put Away Radio"
  61. openguibtn.Text = "Open/Close Music GUI"
  62.  
  63. -- SET IMAGE IDS --
  64. playmusicbtn.Image = "rbxassetid://499381047"
  65. stopmusicbtn.Image = "rbxassetid://499381006"
  66.  
  67. -- BACKGROUND COLOR3 --
  68.  
  69. playmusicint.BackgroundColor3 = Color3.new(136, 136, 136)
  70. openbtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  71. closebtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  72. openguibtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  73. musicidbox.BackgroundColor3 = Color3.fromRGB(109, 109, 109)
  74.  
  75. -- BACKGROUND TRANSPARENCY --
  76.  
  77. playmusicint.BackgroundTransparency = 0.9
  78. playmusicbtn.BackgroundTransparency = 1
  79. stopmusicbtn.BackgroundTransparency = 1
  80. musicidbox.BackgroundTransparency = 0.43
  81. credit.BackgroundTransparency = 1
  82. title.BackgroundTransparency = 1
  83.  
  84. -- BORDER SIZE PIXEL --
  85.  
  86. musicidbox.BorderSizePixel = 0
  87. openbtn.BorderSizePixel = 3
  88. closebtn.BorderSizePixel = 3
  89. openguibtn.BorderSizePixel = 3
  90.  
  91. -- FONTS --
  92. musicidbox.Font = "SourceSansLight"
  93. credit.Font = "SourceSansLight"
  94. title.Font = "SourceSansLight"
  95.  
  96.  
  97. -- TEXT SCALED --
  98. credit.TextScaled = true
  99. title.TextScaled = true
  100.  
  101. -- TEXT WRAPPED --
  102. musicidbox.TextWrapped = true
  103. credit.TextWrapped = true
  104. title.TextWrapped = true
  105. openguibtn.TextWrapped = true
  106.  
  107. -- FONT SIZE --
  108. musicidbox.FontSize = "Size28"
  109.  
  110. -- ACTIVE --
  111. playmusicint.Active = true
  112.  
  113. -- DRAGGABLE --
  114. playmusicint.Draggable = true
  115.  
  116. -- GUI FUNCTIONS (MAIN) --
  117.  
  118. -- set up the stuff --
  119. isGuiOpen = false
  120. closebtn.Visible = false
  121. playmusicint.Visible = false
  122. openguibtn.Visible = false
  123.  
  124. openbtn.MouseButton1Click:connect(function()
  125. openbtn.Visible = false
  126. closebtn.Visible = true
  127.  
  128. local radio = Instance.new("Part", char)
  129. radio.Name = "Radio"
  130. local mesh = Instance.new("FileMesh", radio)
  131. mesh.MeshId = "http://www.roblox.com/asset/?id=5918027543"
  132. mesh.TextureId = "http://www.roblox.com/asset/?id=5918011978"
  133. mesh.Scale = Vector3.new(4, 4, 4)
  134. mesh.VertexColor = Vector3.new(1, 1, 1)
  135. mesh.Offset = Vector3.new(0, 0, 0)
  136.  
  137.  
  138. local function weldBetween(a, b)
  139. local weld = Instance.new("ManualWeld")
  140. weld.Part0 = a
  141. weld.Part1 = b
  142. weld.C0 = CFrame.new()
  143. weld.C1 = b.CFrame:inverse() * a.CFrame
  144. weld.Parent = a
  145. return weld;
  146. end
  147. local hand = radio:clone()
  148. hand.Parent=char
  149. hand.CFrame=char:WaitForChild("Torso").CFrame*CFrame.new(Vector3.new(0,0,0.9))*CFrame.Angles(0,math.rad(180),math.rad(45))
  150. weldBetween(char:WaitForChild("Torso"), hand)
  151. hand.CanCollide=true
  152. hand.Anchored=false
  153.  
  154. sound = Instance.new("Sound", hand) -- we will now call the radio "hand"
  155. sound.Volume = 10
  156. sound.Pitch = 1
  157.  
  158. openguibtn.Visible = true
  159. char:FindFirstChild("Radio"):Destroy()
  160. end)
  161.  
  162.  
  163. closebtn.MouseButton1Click:connect(function()
  164. openbtn.Visible = true
  165. closebtn.Visible = false
  166. openguibtn.Visible = false
  167. playmusicint.Visible = false
  168. isGuiOpen = false
  169. char:WaitForChild("Radio"):Destroy()
  170. end)
  171.  
  172. playmusicbtn.MouseButton1Click:connect(function()
  173. sound:stop()
  174. wait(0.2)
  175. sound.SoundId = "rbxassetid://"..musicidbox.Text
  176. sound:play()
  177. end)
  178.  
  179. stopmusicbtn.MouseButton1Click:connect(function()
  180. sound:stop()
  181. end)
  182.  
  183.  
  184. openguibtn.MouseButton1Click:connect(function()
  185. if isGuiOpen == false then isGuiOpen = true
  186. playmusicint.Visible = true else isGuiOpen = false playmusicint.Visible = false
  187. end
  188. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement