Advertisement
jasonskg1234

Boombox

Oct 18th, 2018
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6. --ffghjkgh67
  7.  
  8. --Script Builder Radio!
  9.  
  10. local Player = game.Players.LocalPlayer
  11. local c = Player.Character
  12. if not c or not c.Parent then
  13. c = Player.CharacterAdded:wait()
  14. end
  15.  
  16. wait(1)
  17.  
  18. local radio = Instance.new("Part",c)
  19. radio.Name = "Radio"
  20. radio.CanCollide = false
  21. radio.Anchored = true
  22. radio.FormFactor = "Custom"
  23. radio.Size = Vector3.new(3.2, 1.43, 0.8)
  24. radio.CFrame = c.Torso.CFrame * CFrame.new(0,0,.8)
  25. radio.CFrame = radio.CFrame * CFrame.fromEulerAnglesXYZ(0,3.15,0)
  26. radio.CFrame = radio.CFrame * CFrame.fromEulerAnglesXYZ(0,0,-.7)
  27.  
  28. local mesh = Instance.new("SpecialMesh",radio)
  29. mesh.MeshId = "http://www.roblox.com/asset/?id=151760030"
  30. mesh.TextureId = "https://www.roblox.com/Sweg-item?id=156708131"
  31.  
  32. local weld = Instance.new("Weld",radio)
  33. weld.Part0 = c.Torso
  34. weld.Part1 = radio
  35. weld.C0 = c.Torso.CFrame:inverse()
  36. weld.C1 = radio.CFrame:inverse()
  37. radio.Anchored = false
  38.  
  39. local sound = Instance.new("Sound",radio)
  40. sound.Name = "Music"
  41. sound.Looped = true
  42. sound.Volume = 1
  43.  
  44. local gui = Instance.new("ScreenGui",Player.PlayerGui)
  45.  
  46. local frame = Instance.new("Frame",gui)
  47. frame.BackgroundColor3 = Color3.new(58/255,58/255,58/255)
  48. frame.BorderColor3 = Color3.new(0,0,0)
  49. frame.BorderSizePixel = 2
  50. frame.Size = UDim2.new(0,300,0,200)
  51. frame.Position = UDim2.new(0,20,.5,-100)
  52.  
  53. local playb = Instance.new("TextButton",frame)
  54. playb.BackgroundColor3 = Color3.new(0,85/255,0)
  55. playb.BorderColor3 = Color3.new(0,0,0)
  56. playb.BorderSizePixel = 2
  57. playb.Size = UDim2.new(.3,0,.2,0)
  58. playb.Position = UDim2.new(.1,0,.7,0)
  59. playb.Text = "Play"
  60. playb.TextColor3 = Color3.new(255,255,255)
  61. playb.TextScaled = true
  62.  
  63. local stopb = Instance.new("TextButton",frame)
  64. stopb.BackgroundColor3 = Color3.new(170/255,0,0)
  65. stopb.BorderColor3 = Color3.new(0,0,0)
  66. stopb.BorderSizePixel = 2
  67. stopb.Size = UDim2.new(.3,0,.2,0)
  68. stopb.Position = UDim2.new(.6,0,.7,0)
  69. stopb.Text = "Stop"
  70. stopb.TextColor3 = Color3.new(255,255,255)
  71. stopb.TextScaled = true
  72.  
  73. local stipb = Instance.new("TextBox",frame)
  74. stipb.BackgroundColor3 = Color3.new(0,0,127/255)
  75. stipb.BorderColor3 = Color3.new(0,0,0)
  76. stipb.BorderSizePixel = 2
  77. stipb:TweenSize(UDim2.new(.5,0,.25,0),"Out","Quad",1,true)
  78. stipb.Position = UDim2.new(.25,0,.3,0)
  79. stipb.Text = "SoundId"
  80. stipb.TextColor3 = Color3.new(255,255,255)
  81. stipb.TextScaled = true
  82.  
  83. local label = Instance.new("TextLabel",frame)
  84. label.Text = "Made By ChuckXZ!"
  85. label.TextScaled = true
  86. label:TweenSize(UDim2.new(1,0,.2,0))
  87. label.TextColor3 = Color3.new(255,255,255)
  88. label.BackgroundTransparency = 1
  89. --stipb.Size = UDim2.new(1,0,.2,0)
  90.  
  91. local Playing = false
  92.  
  93. stipb.Changed:connect(function()
  94. sound.SoundId = "rbxassetid://" .. stipb.Text
  95. end)
  96.  
  97. playb.MouseButton1Click:connect(function()
  98. sound:Play()
  99. Playing = true
  100. end)
  101.  
  102. stopb.MouseButton1Click:connect(function()
  103. sound:Stop()
  104. Playing = false
  105. end)
  106.  
  107. while true do
  108. if Playing then
  109. mesh.Scale = Vector3.new(1.1,1.1,1.1)
  110. wait(.2)
  111. mesh.Scale = Vector3.new(1,1,1)
  112. end
  113. wait(.2)
  114. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement