Advertisement
JacksoMykalJunior

THE GHOST [FE]

Mar 2nd, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.39 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 = owner
  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. ---------------------------------------------------
  90. plr = owner
  91. part = nil
  92. bp = nil
  93. particles = nil
  94. function clerp(a,b,c,d)
  95. for i = 0,d,.01 do
  96. a.CFrame = CFrame.new(b:lerp(c,i))
  97. wait()
  98. end
  99. end
  100. function slerp(a2,b2,c2,d2)
  101. for i2 = 0,d2,.01 do
  102. a2.CFrame = CFrame.new(b2:lerp(c2,i2))
  103. wait()
  104. end
  105. end
  106. mouse.KeyDown:connect(function(key)
  107. if key == "e" and plr.Character.Parent == workspace then
  108. plr.Character.Parent = workspace.Camera
  109. plr.Character.Archivable = true
  110. Instance.new("ForceField",plr.Character).Visible = false
  111. for y,t in pairs(plr.Character:GetChildren()) do
  112. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  113. t.Transparency = 1
  114. if t.Name == "Head" and t:FindFirstChild("face") then
  115. t.face.Transparency = 1
  116. end
  117. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  118. t.Handle.Transparency = 1
  119. end
  120. end
  121. elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
  122. 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)
  123. elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then
  124. if plr.Character.Torso.Anchored == true then
  125. for y,t in pairs(plr.Character:GetChildren()) do
  126. if t:IsA("Part") then
  127. t.Anchored = false
  128. end
  129. end
  130. else
  131. for y,t in pairs(plr.Character:GetChildren()) do
  132. if t:IsA("Part") then
  133. t.Anchored = true
  134. end
  135. end
  136. end
  137. elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then
  138. local clone = part:Clone()
  139. clone.Parent = workspace
  140. clone.Anchored = false
  141. clone:ClearAllChildren()
  142. clone.CanCollide = true
  143. bp.Parent = clone
  144. particles.Parent = clone
  145. if part.Parent:FindFirstChildOfClass("Humanoid") then
  146. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  147. end
  148. part:Destroy()
  149. part = clone
  150. elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then
  151. plr.Character.Parent = workspace
  152. plr.Character.Archivable = false
  153. plr.Character:FindFirstChildOfClass("ForceField"):Remove()
  154. for y,t in pairs(plr.Character:GetChildren()) do
  155. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  156. t.Transparency = 0
  157. if t.Name == "Head" and t:FindFirstChild("face") then
  158. t.face.Transparency = 0
  159. end
  160. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  161. t.Handle.Transparency = 0
  162. end
  163. end
  164. end
  165. end)
  166. mouse.Button1Down:connect(function()
  167. if plr.Character.Parent == workspace.Camera then
  168. if mouse ~= nil then
  169. if mouse.Target ~= nil then
  170. part = mouse.Target
  171. bp = Instance.new("BodyPosition",part)
  172. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  173. bp.Position = part.Position
  174. particles = Instance.new("ParticleEmitter",part)
  175. particles.Color = ColorSequence.new(Color3.new(0,0,0))
  176. particles.Size = NumberSequence.new(1)
  177. particles.Texture = "rbxassetid://292289455"
  178. particles.VelocitySpread = 360
  179. particles.Speed = NumberRange.new(0)
  180. particles.RotSpeed = NumberRange.new(0)
  181. particles.Rotation = NumberRange.new(0)
  182. particles.Rate = 250
  183. particles.Lifetime = NumberRange.new(.2,.4)
  184. particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
  185. dwn = true
  186. end
  187. end
  188. while dwn == true do
  189. wait()
  190. bp.Position = mouse.hit.p
  191. if part then
  192. if part.Parent:FindFirstChildOfClass("Humanoid") then
  193. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  194. end
  195. end
  196. end
  197. end
  198. end)
  199. mouse.Button1Up:connect(function()
  200. dwn = false
  201. if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
  202. if bp then bp:Destroy() end
  203. if particles then particles:Destroy() end
  204. end)
  205. base = Instance.new("ScreenGui",plr.PlayerGui)
  206. bbg = Instance.new("BillboardGui",plr.Character.Head)
  207. bbg.Size = UDim2.new(0,200,0,50)
  208. bbg.StudsOffset = Vector3.new(0,3,0)
  209. bbgTl = Instance.new("TextLabel",bbg)
  210. bbgTl.BackgroundTransparency = 1
  211. bbgTl.Size = UDim2.new(10,0,1,0)
  212. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  213. bbgTl.Font = "Code"
  214. bbgTl.Text = " "
  215. bbgTl.TextSize = 25
  216. bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
  217. bbgTl.TextColor3 = Color3.new(0,0,0)
  218. bbgTl.TextStrokeTransparency = 0
  219. bbgTl.TextWrapped = true
  220. plr.Chatted:connect(function(msg)
  221. bbgTl.Text = msg
  222. wait(5)
  223. if bbgTl.Text == msg then
  224. bbgTl.Text = " "
  225. end
  226. end)
  227. touchCounter = 0
  228. while wait() do
  229. if plr.Character.Parent == workspace.Camera then
  230. local c = plr.Character:Clone()
  231. c:MakeJoints()
  232. for y,t in pairs(c:GetChildren()) do
  233. if t:IsA("Part") then
  234. t.CanCollide = false
  235. t.Anchored = true
  236. t.Transparency = .5
  237. t.TopSurface = "Smooth"
  238. t.BottomSurface = "Smooth"
  239. t.RightSurface = "Smooth"
  240. t.LeftSurface = "Smooth"
  241. t.FrontSurface = "Smooth"
  242. t.BackSurface = "Smooth"
  243. t.BrickColor = BrickColor.new("Really black")
  244. if t.Name == "Head" and t:FindFirstChild("face") then
  245. t.face:Remove()
  246. elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
  247. t.roblox:Remove()
  248. elseif t.Name == "HumanoidRootPart" then
  249. t:Remove()
  250. end
  251. else
  252. t:Remove()
  253. end
  254. end
  255. c.Parent = workspace
  256. game.Debris:AddItem(c,.05)
  257. end
  258. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement