Advertisement
JacksoMykalJunior

Unkillable [FE]

Mar 2nd, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.35 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = Red_Jack142
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87.  
  88.  
  89. plr = Red_Jack142
  90. part = nil
  91. bp = nil
  92. particles = nil
  93. function clerp(a,b,c,d)
  94. for i = 0,d,.01 do
  95. a.CFrame = CFrame.new(b:lerp(c,i))
  96. wait()
  97. end
  98. end
  99. function slerp(a2,b2,c2,d2)
  100. for i2 = 0,d2,.01 do
  101. a2.CFrame = CFrame.new(b2:lerp(c2,i2))
  102. wait()
  103. end
  104. end
  105. mouse.KeyDown:connect(function(key)
  106. if key == "e" and plr.Character.Parent == workspace then
  107. plr.Character.Parent = workspace.Camera
  108. plr.Character.Archivable = true
  109. Instance.new("ForceField",plr.Character).Visible = false
  110. for y,t in pairs(plr.Character:GetChildren()) do
  111. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  112. t.Transparency = 1
  113. if t.Name == "Head" and t:FindFirstChild("face") then
  114. t.face.Transparency = 1
  115. end
  116. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  117. t.Handle.Transparency = 1
  118. end
  119. end
  120. elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
  121. plr.Character.Torso.CFrame = CFrame.new(Vector3.new(mouse.hit.p.X,mouse.hit.p.Y+1.5,mouse.hit.p.Z),plr.Character.Torso.CFrame.p)
  122. elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then
  123. if plr.Character.Torso.Anchored == true then
  124. for y,t in pairs(plr.Character:GetChildren()) do
  125. if t:IsA("Part") then
  126. t.Anchored = false
  127. end
  128. end
  129. else
  130. for y,t in pairs(plr.Character:GetChildren()) do
  131. if t:IsA("Part") then
  132. t.Anchored = true
  133. end
  134. end
  135. end
  136. elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then
  137. local clone = part:Clone()
  138. clone.Parent = workspace
  139. clone.Anchored = false
  140. clone:ClearAllChildren()
  141. clone.CanCollide = true
  142. bp.Parent = clone
  143. particles.Parent = clone
  144. if part.Parent:FindFirstChildOfClass("Humanoid") then
  145. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  146. end
  147. part:Destroy()
  148. part = clone
  149. elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then
  150. plr.Character.Parent = workspace
  151. plr.Character.Archivable = false
  152. plr.Character:FindFirstChildOfClass("ForceField"):Remove()
  153. for y,t in pairs(plr.Character:GetChildren()) do
  154. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  155. t.Transparency = 0
  156. if t.Name == "Head" and t:FindFirstChild("face") then
  157. t.face.Transparency = 0
  158. end
  159. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  160. t.Handle.Transparency = 0
  161. end
  162. end
  163. end
  164. end)
  165. mouse.Button1Down:connect(function()
  166. if plr.Character.Parent == workspace.Camera then
  167. if mouse ~= nil then
  168. if mouse.Target ~= nil then
  169. part = mouse.Target
  170. bp = Instance.new("BodyPosition",part)
  171. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  172. bp.Position = part.Position
  173. particles = Instance.new("ParticleEmitter",part)
  174. particles.Color = ColorSequence.new(Color3.new(0,0,0))
  175. particles.Size = NumberSequence.new(1)
  176. particles.Texture = "rbxassetid://292289455"
  177. particles.VelocitySpread = 360
  178. particles.Speed = NumberRange.new(0)
  179. particles.RotSpeed = NumberRange.new(0)
  180. particles.Rotation = NumberRange.new(0)
  181. particles.Rate = 250
  182. particles.Lifetime = NumberRange.new(.2,.4)
  183. particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
  184. dwn = true
  185. end
  186. end
  187. while dwn == true do
  188. wait()
  189. bp.Position = mouse.hit.p
  190. if part then
  191. if part.Parent:FindFirstChildOfClass("Humanoid") then
  192. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  193. end
  194. end
  195. end
  196. end
  197. end)
  198. mouse.Button1Up:connect(function()
  199. dwn = false
  200. if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
  201. if bp then bp:Destroy() end
  202. if particles then particles:Destroy() end
  203. end)
  204. base = Instance.new("ScreenGui",plr.PlayerGui)
  205. bbg = Instance.new("BillboardGui",plr.Character.Head)
  206. bbg.Size = UDim2.new(0,200,0,50)
  207. bbg.StudsOffset = Vector3.new(0,3,0)
  208. bbgTl = Instance.new("TextLabel",bbg)
  209. bbgTl.BackgroundTransparency = 1
  210. bbgTl.Size = UDim2.new(10,0,1,0)
  211. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  212. bbgTl.Font = "Code"
  213. bbgTl.Text = " "
  214. bbgTl.TextSize = 25
  215. bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
  216. bbgTl.TextColor3 = Color3.new(0,0,0)
  217. bbgTl.TextStrokeTransparency = 0
  218. bbgTl.TextWrapped = true
  219. plr.Chatted:connect(function(msg)
  220. bbgTl.Text = msg
  221. wait(5)
  222. if bbgTl.Text == msg then
  223. bbgTl.Text = " "
  224. end
  225. end)
  226. touchCounter = 0
  227. while wait() do
  228. if plr.Character.Parent == workspace.Camera then
  229. local c = plr.Character:Clone()
  230. c:MakeJoints()
  231. for y,t in pairs(c:GetChildren()) do
  232. if t:IsA("Part") then
  233. t.CanCollide = false
  234. t.Anchored = true
  235. t.Transparency = .5
  236. t.TopSurface = "Smooth"
  237. t.BottomSurface = "Smooth"
  238. t.RightSurface = "Smooth"
  239. t.LeftSurface = "Smooth"
  240. t.FrontSurface = "Smooth"
  241. t.BackSurface = "Smooth"
  242. t.BrickColor = BrickColor.new("Really black")
  243. if t.Name == "Head" and t:FindFirstChild("face") then
  244. t.face:Remove()
  245. elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
  246. t.roblox:Remove()
  247. elseif t.Name == "HumanoidRootPart" then
  248. t:Remove()
  249. end
  250. else
  251. t:Remove()
  252. end
  253. end
  254. c.Parent = workspace
  255. game.Debris:AddItem(c,.05)
  256. end
  257. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement