Advertisement
zza

bruh

zza
Jul 6th, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.98 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. 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()}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;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 t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)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 self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({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")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  5.  
  6. local Player = game.Players.LocalPlayer
  7. local Char = Player.Character
  8. local Head = Char.Head
  9. local Root = Char.HumanoidRootPart
  10. local LeftArm = Char["Left Arm"]
  11. local RightArm = Char["Right Arm"]
  12. local LeftLeg = Char["Left Leg"]
  13. local RightLeg = Char["Right Leg"]
  14. local Torso = Char.Torso
  15.  
  16. function AntiDeath()
  17. if Head:FindFirstChild("ManualWeld") then
  18. Head:FindFirstChild("ManualWeld"):Destroy()
  19. end
  20. if Torso:FindFirstChild("ManualWeld") then
  21. Torso:FindFirstChild("ManualWeld"):Destroy()
  22. end
  23. if LeftArm:FindFirstChild("ManualWeld") then
  24. LeftArm:FindFirstChild("ManualWeld"):Destroy()
  25. end
  26. if RightArm:FindFirstChild("ManualWeld") then
  27. RightArm:FindFirstChild("ManualWeld"):Destroy()
  28. end
  29. if Root:FindFirstChild("ManualWeld") then
  30. Root:FindFirstChild("ManualWeld"):Destroy()
  31. end
  32. if LeftLeg:FindFirstChild("ManualWeld") then
  33. LeftLeg:FindFirstChild("ManualWeld"):Destroy()
  34. end
  35. if RightLeg:FindFirstChild("ManualWeld") then
  36. RightLeg:FindFirstChild("ManualWeld"):Destroy()
  37. end
  38.  
  39. local HEADLERP = Instance.new("ManualWeld")
  40. HEADLERP.Parent = Head
  41. HEADLERP.Part0 = Head
  42. HEADLERP.Part1 = Head
  43. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  44.  
  45. local TORSOLERP = Instance.new("ManualWeld")
  46. TORSOLERP.Parent = Root
  47. TORSOLERP.Part0 = Torso
  48. TORSOLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  49.  
  50. local ROOTLERP = Instance.new("ManualWeld")
  51. ROOTLERP.Parent = Root
  52. ROOTLERP.Part0 = Root
  53. ROOTLERP.Part1 = Torso
  54. ROOTLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  55.  
  56. local RIGHTARMLERP = Instance.new("ManualWeld")
  57. RIGHTARMLERP.Parent = RightArm
  58. RIGHTARMLERP.Part0 = RightArm
  59. RIGHTARMLERP.Part1 = Torso
  60. RIGHTARMLERP.C0 = CFrame.new(-1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  61.  
  62. local LEFTARMLERP = Instance.new("ManualWeld")
  63. LEFTARMLERP.Parent = LeftArm
  64. LEFTARMLERP.Part0 = LeftArm
  65. LEFTARMLERP.Part1 = Torso
  66. LEFTARMLERP.C0 = CFrame.new(1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  67.  
  68. local RIGHTLEGLERP = Instance.new("ManualWeld")
  69. RIGHTLEGLERP.Parent = RightLeg
  70. RIGHTLEGLERP.Part0 = RightLeg
  71. RIGHTLEGLERP.Part1 = Torso
  72. RIGHTLEGLERP.C0 = CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  73.  
  74. local LEFTLEGLERP = Instance.new("ManualWeld")
  75. LEFTLEGLERP.Parent = LeftLeg
  76. LEFTLEGLERP.Part0 = LeftLeg
  77. LEFTLEGLERP.Part1 = Torso
  78. LEFTLEGLERP.C0 = CFrame.new(0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  79.  
  80. Char.Humanoid:Destroy()
  81. local hum = Instance.new("Humanoid", Char)
  82. hum.BreakJointsOnDeath = false
  83. hum.Died:Connect(function()
  84. AntiDeath()
  85. end)
  86. end
  87.  
  88.  
  89. local function weldBetween(a, b)
  90. local weld = Instance.new("ManualWeld", a)
  91. weld.Part0 = a
  92. weld.Part1 = b
  93. weld.C0 = a.CFrame:inverse() * b.CFrame
  94. return weld
  95. end
  96.  
  97. local equip = false
  98.  
  99. ArtificialHB = Instance.new("BindableEvent", script)
  100. ArtificialHB.Name = "Heartbeat"
  101. script:WaitForChild("Heartbeat")
  102.  
  103. frame = 1 / 60
  104. tf = 0
  105. allowframeloss = false
  106. tossremainder = false
  107.  
  108.  
  109. lastframe = tick()
  110. script.Heartbeat:Fire()
  111.  
  112.  
  113. game:GetService("RunService").Heartbeat:connect(function(s, p)
  114. tf = tf + s
  115. if tf >= frame then
  116. if allowframeloss then
  117. script.Heartbeat:Fire()
  118. lastframe = tick()
  119. else
  120. for i = 1, math.floor(tf / frame) do
  121. script.Heartbeat:Fire()
  122. end
  123. lastframe = tick()
  124. end
  125. if tossremainder then
  126. tf = 0
  127. else
  128. tf = tf - frame * math.floor(tf / frame)
  129. end
  130. end
  131. end)
  132.  
  133. function swait(num)
  134. if num == 0 or num == nil then
  135. game:service("RunService").Stepped:wait(0)
  136. else
  137. for i = 0, num do
  138. game:service("RunService").Stepped:wait(0)
  139. end
  140. end
  141. end
  142.  
  143. Char.Humanoid.BreakJointsOnDeath = false
  144.  
  145. Char.Humanoid.Died:Connect(function()
  146. AntiDeath()
  147. end)
  148.  
  149. while wait() do
  150. Char:FindFirstChildOfClass("Humanoid").MaxHealth = math.huge
  151. Char:FindFirstChildOfClass("Humanoid").Health = math.huge
  152. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement