lafur

Untitled

Nov 8th, 2020
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. local d = game.Players.LocalPlayer.Character:GetChildren()
  7. for i=1, #d do
  8. if (d[i].className == "Hat") then
  9. d[i]:remove()
  10. end
  11. end
  12.  
  13. for i=1, #d do
  14. if (d[i].className == "Accessory") then
  15. d[i]:remove()
  16. end
  17. end
  18.  
  19. local LA = Instance.new("SpecialMesh")
  20. local RA = Instance.new("SpecialMesh")
  21. local LL = Instance.new("SpecialMesh")
  22. local RL = Instance.new("SpecialMesh")
  23. local H = Instance.new("SpecialMesh")
  24. local T = Instance.new("SpecialMesh")
  25.  
  26. local pl = game.Players.LocalPlayer.Character
  27.  
  28. local la = pl:WaitForChild("Left Arm")
  29. local ra = pl:WaitForChild("Right Arm")
  30. local ll = pl:WaitForChild("Left Leg")
  31. local rl = pl:WaitForChild("Right Leg")
  32. local h = pl:WaitForChild("Head")
  33. local t = pl:WaitForChild("Torso")
  34.  
  35.  
  36. LA.Parent = la
  37. RA.Parent = ra
  38. LL.Parent = ll
  39. RL.Parent = rl
  40. H.Parent = h
  41. T.Parent = t
  42.  
  43. LA.Scale = Vector3.new(0,0,0)
  44. RA.Scale = Vector3.new(0,0,0)
  45. LA.Offset = Vector3.new(-1,0,0)
  46. RA.Offset = Vector3.new(1,0,0)
  47. LA.MeshType = Enum.MeshType.Sphere
  48. RA.MeshType = Enum.MeshType.Sphere
  49. RL.MeshType = Enum.MeshType.Head
  50. LL.MeshType = Enum.MeshType.Head
  51.  
  52. T.Scale = Vector3.new(1.5,2,2.5)
  53. T.MeshType = Enum.MeshType.Sphere
  54.  
  55. H.Scale = Vector3.new(1,1.25,1.5)
  56. H.Offset = Vector3.new(0,-0.75,-0.75)
  57. H.MeshType = Enum.MeshType.Sphere
  58.  
  59. local COLOR = BrickColor.Random()
  60.  
  61. la.BrickColor = COLOR
  62. ra.BrickColor = COLOR
  63. ll.BrickColor = COLOR
  64. rl.BrickColor = COLOR
  65. h.BrickColor = BrickColor.new("Toothpaste")
  66. h.Reflectance = 0.5
  67. t.BrickColor = COLOR
  68.  
  69. h.face:Destroy()
  70.  
  71. la.TopSurface = Enum.SurfaceType.Smooth
  72. la.BottomSurface = Enum.SurfaceType.Smooth
  73. la.LeftSurface = Enum.SurfaceType.Smooth
  74. la.RightSurface = Enum.SurfaceType.Smooth
  75. la.FrontSurface = Enum.SurfaceType.Smooth
  76. la.BackSurface = Enum.SurfaceType.Smooth
  77.  
  78. ra.TopSurface = Enum.SurfaceType.Smooth
  79. ra.BottomSurface = Enum.SurfaceType.Smooth
  80. ra.LeftSurface = Enum.SurfaceType.Smooth
  81. ra.RightSurface = Enum.SurfaceType.Smooth
  82. ra.FrontSurface = Enum.SurfaceType.Smooth
  83. ra.BackSurface = Enum.SurfaceType.Smooth
  84.  
  85. ll.TopSurface = Enum.SurfaceType.Smooth
  86. ll.BottomSurface = Enum.SurfaceType.Smooth
  87. ll.LeftSurface = Enum.SurfaceType.Smooth
  88. ll.RightSurface = Enum.SurfaceType.Smooth
  89. ll.FrontSurface = Enum.SurfaceType.Smooth
  90. ll.BackSurface = Enum.SurfaceType.Smooth
  91.  
  92. rl.TopSurface = Enum.SurfaceType.Smooth
  93. rl.BottomSurface = Enum.SurfaceType.Smooth
  94. rl.LeftSurface = Enum.SurfaceType.Smooth
  95. rl.RightSurface = Enum.SurfaceType.Smooth
  96. rl.FrontSurface = Enum.SurfaceType.Smooth
  97. rl.BackSurface = Enum.SurfaceType.Smooth
  98.  
  99. t.TopSurface = Enum.SurfaceType.Smooth
  100. t.BottomSurface = Enum.SurfaceType.Smooth
  101. t.LeftSurface = Enum.SurfaceType.Smooth
  102. t.RightSurface = Enum.SurfaceType.Smooth
  103. t.FrontSurface = Enum.SurfaceType.Smooth
  104. t.BackSurface = Enum.SurfaceType.Smooth
  105.  
  106. h.TopSurface = Enum.SurfaceType.Smooth
  107. h.BottomSurface = Enum.SurfaceType.Smooth
  108. h.LeftSurface = Enum.SurfaceType.Smooth
  109. h.RightSurface = Enum.SurfaceType.Smooth
  110. h.FrontSurface = Enum.SurfaceType.Smooth
  111. h.BackSurface = Enum.SurfaceType.Smooth
Add Comment
Please, Sign In to add comment