Advertisement
Hermaxs

Untitled

Jan 15th, 2019
155
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,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")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
  6.  
  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 naser2018!"
  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