Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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(),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
  5.  
  6. plr = owner
  7. repeat wait() until plr.Character
  8. char = plr.Character
  9.  
  10. -- Credit to shack for the anti death system
  11.  
  12. local BODY = {}
  13. LeftArm = char["Left Arm"]
  14. RightLeg = char["Right Leg"]
  15. LeftLeg = char["Left Leg"]
  16. for _, c in pairs(char:GetDescendants()) do
  17. if c:IsA("BasePart") and c.Name ~= "Handle" then
  18. if c ~= char.HumanoidRootPart and c ~= char.Torso and c ~= char.Head and c ~= char["Right Arm"] and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  19. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  20. end
  21. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  22. elseif c:IsA("JointInstance") then
  23. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  24. end
  25. end
  26. for e = 1, #BODY do
  27. if BODY[e] ~= nil then
  28. local STUFF = BODY[e]
  29. local PART = STUFF[1]
  30. local PARENT = STUFF[2]
  31. local MATERIAL = STUFF[3]
  32. local COLOR = STUFF[4]
  33. local TRANSPARENCY = STUFF[5]
  34. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  35. PART.Material = MATERIAL
  36. PART.Color = COLOR
  37. PART.Transparency = TRANSPARENCY
  38. end
  39. PART.AncestryChanged:Connect(function()
  40. PART.Parent = PARENT
  41. end)
  42. end
  43. end
  44. function refit()
  45. char.Parent = workspace
  46. for e = 1, #BODY do
  47. if BODY[e] ~= nil then
  48. local STUFF = BODY[e]
  49. local PART = STUFF[1]
  50. local PARENT = STUFF[2]
  51. local MATERIAL = STUFF[3]
  52. local COLOR = STUFF[4]
  53. local TRANSPARENCY = STUFF[5]
  54. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  55. PART.Material = MATERIAL
  56. PART.Color = COLOR
  57. PART.Transparency = TRANSPARENCY
  58. end
  59. if PART.Parent ~= PARENT then
  60. char:FindFirstChildOfClass("Humanoid"):remove()
  61. PART.Parent = PARENT
  62. Humanoid = Instance.new("Humanoid",char)
  63. end
  64. end
  65. end
  66. end
  67. char.Humanoid.Died:connect(function()
  68. refit()
  69. end)
  70. local torso = Instance.new("SelectionBox",char)
  71. torso.Adornee = char.Torso
  72. local leftarm = Instance.new("SelectionBox",char)
  73. leftarm.Adornee = LeftArm
  74. local rightarm = Instance.new("SelectionBox",char)
  75. rightarm.Adornee = char["Right Arm"]
  76. local leftleg = Instance.new("SelectionBox",char)
  77. leftleg.Adornee = LeftLeg
  78. local rightleg = Instance.new("SelectionBox",char)
  79. rightleg.Adornee = char["Right Leg"]
  80. -- Color pallet
  81. green = "Lime green"
  82. red = "Really red"
  83. blue = "Electric blue"
  84. yellow = "New Yeller"
  85. violet = "Pastel violet"
  86.  
  87. coroutine.wrap(function()
  88. while true do
  89. wait(0.5)
  90. torso.Color3 = BrickColor.new(green).Color
  91. rightarm.Color3 = BrickColor.new(green).Color
  92. leftarm.Color3 = BrickColor.new(green).Color
  93. leftleg.Color3 = BrickColor.new(green).Color
  94. rightleg.Color3 = BrickColor.new(green).Color
  95. wait(0.5)
  96. torso.Color3 = BrickColor.new(red).Color
  97. rightarm.Color3 = BrickColor.new(red).Color
  98. leftarm.Color3 = BrickColor.new(red).Color
  99. leftleg.Color3 = BrickColor.new(red).Color
  100. rightleg.Color3 = BrickColor.new(red).Color
  101. wait(0.5)
  102. torso.Color3 = BrickColor.new(blue).Color
  103. rightarm.Color3 = BrickColor.new(blue).Color
  104. leftarm.Color3 = BrickColor.new(blue).Color
  105. leftleg.Color3 = BrickColor.new(blue).Color
  106. rightleg.Color3 = BrickColor.new(blue).Color
  107. wait(0.5)
  108. torso.Color3 = BrickColor.new(yellow).Color
  109. rightarm.Color3 = BrickColor.new(yellow).Color
  110. leftarm.Color3 = BrickColor.new(yellow).Color
  111. leftleg.Color3 = BrickColor.new(yellow).Color
  112. rightleg.Color3 = BrickColor.new(yellow).Color
  113. wait(0.5)
  114. torso.Color3 = BrickColor.new(violet).Color
  115. rightarm.Color3 = BrickColor.new(violet).Color
  116. leftarm.Color3 = BrickColor.new(violet).Color
  117. leftleg.Color3 = BrickColor.new(violet).Color
  118. rightleg.Color3 = BrickColor.new(violet).Color
  119. end
  120. end)()
  121. while true do
  122. wait()
  123. refit()
  124. char.Humanoid.Health = math.huge
  125. char.Humanoid.MaxHealth = math.huge
  126. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement