Advertisement
JacksoMykalJunior

Unkillable

Mar 19th, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.29 KB | None | 0 0
  1. --//==============================\\--
  2. --|| UNKILLABLE SCRIPT
  3. --\\==============================//--
  4.  
  5.  
  6.  
  7. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  8. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  9. do
  10. print("FE Covered By Red_Jack142 | FE Made By Red_Jack142")
  11. print("Have Fun!")
  12. script.Parent = Player.Character
  13.  
  14. --RemoteEvent for communicating
  15. local Event = Instance.new("RemoteEvent")
  16. Event.Name = "UserInput_Event"
  17.  
  18. --Fake event to make stuff like Mouse.KeyDown work
  19. local function fakeEvent()
  20. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  21. t.connect = t.Connect
  22. return t
  23. end
  24.  
  25. --Creating fake input objects with fake variables
  26. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  27. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  28. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  29. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  30. end}
  31. --Merged 2 functions into one by checking amount of arguments
  32. CAS.UnbindAction = CAS.BindAction
  33.  
  34. --This function will trigger the events that have been :Connect()'ed
  35. local function te(self,ev,...)
  36. local t = m[ev]
  37. if t and t._fakeEvent and t.Function then
  38. t.Function(...)
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=Player then return end
  46. if io.isMouse then
  47. m.Target = io.Target
  48. m.Hit = io.Hit
  49. else
  50. local b = io.UserInputState == Enum.UserInputState.Begin
  51. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  52. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = owner
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local Mouse = Player:GetMouse()
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  89. end
  90.  
  91.  
  92.  
  93.  
  94. print("Loading...")
  95.  
  96. wait(2)
  97. print("COMPLETE!")
  98.  
  99.  
  100.  
  101. plr = owner
  102. repeat wait() until plr.Character
  103. char = plr.Character
  104.  
  105. -- Credit to shack for the anti death system
  106.  
  107. local BODY = {}
  108. LeftArm = char["Left Arm"]
  109. RightLeg = char["Right Leg"]
  110. LeftLeg = char["Left Leg"]
  111. for _, c in pairs(char:GetDescendants()) do
  112. if c:IsA("BasePart") and c.Name ~= "Handle" then
  113. 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
  114. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  115. end
  116. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  117. elseif c:IsA("JointInstance") then
  118. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  119. end
  120. end
  121. for e = 1, #BODY do
  122. if BODY[e] ~= nil then
  123. local STUFF = BODY[e]
  124. local PART = STUFF[1]
  125. local PARENT = STUFF[2]
  126. local MATERIAL = STUFF[3]
  127. local COLOR = STUFF[4]
  128. local TRANSPARENCY = STUFF[5]
  129. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  130. PART.Material = MATERIAL
  131. PART.Color = COLOR
  132. PART.Transparency = TRANSPARENCY
  133. end
  134. PART.AncestryChanged:Connect(function()
  135. PART.Parent = PARENT
  136. end)
  137. end
  138. end
  139. function refit()
  140. char.Parent = workspace
  141. for e = 1, #BODY do
  142. if BODY[e] ~= nil then
  143. local STUFF = BODY[e]
  144. local PART = STUFF[1]
  145. local PARENT = STUFF[2]
  146. local MATERIAL = STUFF[3]
  147. local COLOR = STUFF[4]
  148. local TRANSPARENCY = STUFF[5]
  149. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  150. PART.Material = MATERIAL
  151. PART.Color = COLOR
  152. PART.Transparency = TRANSPARENCY
  153. end
  154. if PART.Parent ~= PARENT then
  155. char:FindFirstChildOfClass("Humanoid"):remove()
  156. PART.Parent = PARENT
  157. Humanoid = Instance.new("Humanoid",char)
  158. end
  159. end
  160. end
  161. end
  162. char.Humanoid.Died:connect(function()
  163. refit()
  164. end)
  165. local torso = Instance.new("SelectionBox",char)
  166. torso.Adornee = char.Torso
  167. local leftarm = Instance.new("SelectionBox",char)
  168. leftarm.Adornee = LeftArm
  169. local rightarm = Instance.new("SelectionBox",char)
  170. rightarm.Adornee = char["Right Arm"]
  171. local leftleg = Instance.new("SelectionBox",char)
  172. leftleg.Adornee = LeftLeg
  173. local rightleg = Instance.new("SelectionBox",char)
  174. rightleg.Adornee = char["Right Leg"]
  175. -- Color pallet
  176. green = "Lime green"
  177. red = "Really red"
  178. blue = "Electric blue"
  179. yellow = "New Yeller"
  180. violet = "Pastel violet"
  181.  
  182. coroutine.wrap(function()
  183. while true do
  184. wait(0.5)
  185. torso.Color3 = BrickColor.new(green).Color
  186. rightarm.Color3 = BrickColor.new(green).Color
  187. leftarm.Color3 = BrickColor.new(green).Color
  188. leftleg.Color3 = BrickColor.new(green).Color
  189. rightleg.Color3 = BrickColor.new(green).Color
  190. wait(0.5)
  191. torso.Color3 = BrickColor.new(red).Color
  192. rightarm.Color3 = BrickColor.new(red).Color
  193. leftarm.Color3 = BrickColor.new(red).Color
  194. leftleg.Color3 = BrickColor.new(red).Color
  195. rightleg.Color3 = BrickColor.new(red).Color
  196. wait(0.5)
  197. torso.Color3 = BrickColor.new(blue).Color
  198. rightarm.Color3 = BrickColor.new(blue).Color
  199. leftarm.Color3 = BrickColor.new(blue).Color
  200. leftleg.Color3 = BrickColor.new(blue).Color
  201. rightleg.Color3 = BrickColor.new(blue).Color
  202. wait(0.5)
  203. torso.Color3 = BrickColor.new(yellow).Color
  204. rightarm.Color3 = BrickColor.new(yellow).Color
  205. leftarm.Color3 = BrickColor.new(yellow).Color
  206. leftleg.Color3 = BrickColor.new(yellow).Color
  207. rightleg.Color3 = BrickColor.new(yellow).Color
  208. wait(0.5)
  209. torso.Color3 = BrickColor.new(violet).Color
  210. rightarm.Color3 = BrickColor.new(violet).Color
  211. leftarm.Color3 = BrickColor.new(violet).Color
  212. leftleg.Color3 = BrickColor.new(violet).Color
  213. rightleg.Color3 = BrickColor.new(violet).Color
  214. end
  215. end)()
  216. while true do
  217. wait()
  218. refit()
  219. while true do
  220. char.Humanoid.Health = "inf"
  221. char.Humanoid.MaxHealth = "inf"
  222. wait(0)
  223. end
  224. ----- THANKS FOR USING
  225. end
  226.  
  227.  
  228. --//============================\\--
  229. --|| END OF SCRIPT
  230. --\\============================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement