Advertisement
lafur

Untitled

Sep 16th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.13 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 Name="LocalPlayer"
  6. pcall(function() workspace[Name].Droid:remove() end)
  7. player = game.Players[Name]
  8. char = player.Character
  9. char.Humanoid.MaxHealth = math.huge
  10. wait(0.5)
  11. char.Humanoid.Health = char.Humanoid.MaxHealth
  12.  
  13. Time=500000
  14.  
  15. r=tick()
  16. wait()
  17. print("Your life span is: ~"..math.floor((Time/(tick()-r))*(tick()-r)))
  18.  
  19. function Infect(char)
  20. Color=BrickColor.new("Brown")
  21. Color2=BrickColor.new("Grime")
  22. local model = Instance.new("Model")
  23. model.Parent = char
  24. model.Name = "Droid"
  25. char.Humanoid.WalkSpeed=12
  26. fake=char.Head:clone()
  27. pcall(function() fake.face:remove() char.Head.face:remove()
  28. char.Head.Transparency=1
  29. fake.Parent=model
  30. fake.Transparency=0
  31. w=Instance.new("Weld")
  32. w.Part1=fake
  33. w.Part0=char.Head
  34. w.Parent=char
  35. fake.Mesh.Scale=fake.Mesh.Scale+Vector3.new(-0.01,-0.01,-0.01)
  36. fake.BrickColor=Color2
  37. for _,v in pairs(char:children()) do
  38. if v.className=="Part" then
  39. v.TopSurface="Smooth"
  40. v.BottomSurface="Smooth"
  41. elseif v.className=="Hat" then
  42. v:remove()
  43. end
  44. end
  45. char.Shirt:remove()
  46. char.Pants:remove()
  47. end)
  48. char.Head.Changed:connect(function(p)
  49. if p=="BrickColor" then
  50. wait()
  51. char["Right Leg"].BrickColor=Color
  52. char["Left Leg"].BrickColor=Color
  53. char["Torso"].BrickColor=Color
  54. char["Head"].BrickColor=Color2
  55. char["Right Arm"].BrickColor=Color2
  56. char["Left Arm"].BrickColor=Color2
  57. end
  58. end)
  59. char.Head.BrickColor=BrickColor:Red()
  60. Arms={char.Torso["Left Shoulder"],char.Torso["Right Shoulder"]} or {char.Torso["Left Shouldr"],char.Torso["Right Shouldr"]}
  61. char.Torso.Neck.C0=char.Torso.Neck.C0*CFrame.Angles(math.rad(8),math.rad(12),0)
  62. Arms[1].Parent=nil
  63. w = Instance.new("Weld")
  64. w.Name="Left Shouldr"
  65. w.Parent = char.Torso
  66. w.Part0 = char["Left Arm"]
  67. w.Part1 = w.Parent
  68. w.C0=CFrame.new(1.5,0.3,0)*CFrame.Angles(math.rad(-95),math.rad(9),math.rad(20))
  69. Arms[2].Parent=nil
  70. w2 = Instance.new("Weld")
  71. w2.Name="Right Shouldr"
  72. w2.Parent = char.Torso
  73. w2.Part0 = char["Right Arm"]
  74. w2.Part1 = w2.Parent
  75. w2.C0=CFrame.new(-1.5,0.3,0)*CFrame.Angles(math.rad(-95),math.rad(-9),math.rad(-20))
  76. char["Left Arm"].Touched:connect(function(hit)
  77. if hit.Parent:findFirstChild("Torso") and hit.Parent.Torso:findFirstChild("Right Shoulder") then
  78. Delay(0,function() Infect(hit.Parent) end)
  79. end
  80. end)
  81. char["Right Arm"].Touched:connect(function(hit)
  82. if hit.Parent:findFirstChild("Torso") and hit.Parent.Torso:findFirstChild("Right Shoulder") then
  83. Delay(0,function() Infect(hit.Parent) end)
  84. end
  85. end)
  86. Delay(0,function()
  87. r=tick()
  88. wait()
  89. local charh=char
  90. for i=1,Time/(tick()-r) do
  91. wait()
  92. Dist=150
  93. Targ=nil
  94. for _,v in pairs(game.Players:children()) do
  95. if v:IsA("Player") and v.Character and v.Character:findFirstChild("Torso") and v.Character.Torso:findFirstChild("Right Shoulder") then
  96. if (v.Character.Torso.Position-charh.Torso.Position).magnitude<Dist then
  97. Dist=(v.Character.Torso.Position-charh.Torso.Position).magnitude
  98. Targ=v.Character.Torso
  99. end
  100. end
  101. end
  102. if Targ and Targ.Parent then
  103. charh.Humanoid:MoveTo(Targ.Position,workspace.Base)
  104. Targ=nil
  105. end
  106. end
  107. charh.Head:remove()
  108. end)
  109. end
  110.  
  111. Infect(char)
  112. --lego
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement