Advertisement
kebbyfan

FE ghost maybe

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