Advertisement
JacksoMykalJunior

GHOST V2 V3 V4 [FE]

Mar 3rd, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.34 KB | None | 0 0
  1.  
  2. -- This script has been converted to FE by iPxter
  3.  
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  7. do
  8. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  9. script.Parent = Player.Character
  10.  
  11. --RemoteEvent for communicating
  12. local Event = Instance.new("RemoteEvent")
  13. Event.Name = "UserInput_Event"
  14.  
  15. --Fake event to make stuff like Mouse.KeyDown work
  16. local function fakeEvent()
  17. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  18. t.connect = t.Connect
  19. return t
  20. end
  21.  
  22. --Creating fake input objects with fake variables
  23. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  24. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  25. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  26. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  27. end}
  28. --Merged 2 functions into one by checking amount of arguments
  29. CAS.UnbindAction = CAS.BindAction
  30.  
  31. --This function will trigger the events that have been :Connect()'ed
  32. local function te(self,ev,...)
  33. local t = m[ev]
  34. if t and t._fakeEvent and t.Function then
  35. t.Function(...)
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=Player then return end
  43. if io.isMouse then
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. else
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. for _,t in pairs(CAS.Actions) do
  52. for _,k in pairs(t.Keys) do
  53. if k==io.KeyCode then
  54. t.Function(t.Name,io.UserInputState,io)
  55. end
  56. end
  57. end
  58. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  59. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  60. end
  61. end)
  62. Event.Parent = NLS([==[
  63. local Player = owner
  64. local Event = script:WaitForChild("UserInput_Event")
  65.  
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local Mouse = Player:GetMouse()
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  86. end
  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