Advertisement
Prephy

ghost

Oct 22nd, 2020
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.53 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  5.  
  6. wait(2)
  7.  
  8. plr = game.Players.LocalPlayer
  9. mouse = plr:GetMouse()
  10. part = nil
  11. bp = nil
  12. particles = nil
  13. function clerp(a,b,c,d)
  14. for i = 0,d,.01 do
  15. a.CFrame = CFrame.new(b:lerp(c,i))
  16. wait()
  17. end
  18. end
  19. function slerp(a2,b2,c2,d2)
  20. for i2 = 0,d2,.01 do
  21. a2.CFrame = CFrame.new(b2:lerp(c2,i2))
  22. wait()
  23. end
  24. end
  25. mouse.KeyDown:connect(function(key)
  26. if key == "e" and plr.Character.Parent == workspace then
  27. plr.Character.Parent = workspace.Camera
  28. plr.Character.Archivable = true
  29. Instance.new("ForceField",plr.Character).Visible = false
  30. for y,t in pairs(plr.Character:GetChildren()) do
  31. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  32. t.Transparency = 1
  33. if t.Name == "Head" and t:FindFirstChild("face") then
  34. t.face.Transparency = 1
  35. end
  36. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  37. t.Handle.Transparency = 1
  38. end
  39. end
  40. elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
  41. 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)
  42. elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then
  43. if plr.Character.Torso.Anchored == true then
  44. for y,t in pairs(plr.Character:GetChildren()) do
  45. if t:IsA("Part") then
  46. t.Anchored = false
  47. end
  48. end
  49. else
  50. for y,t in pairs(plr.Character:GetChildren()) do
  51. if t:IsA("Part") then
  52. t.Anchored = true
  53. end
  54. end
  55. end
  56. elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then
  57. local clone = part:Clone()
  58. clone.Parent = workspace
  59. clone.Anchored = false
  60. clone:ClearAllChildren()
  61. clone.CanCollide = true
  62. bp.Parent = clone
  63. particles.Parent = clone
  64. if part.Parent:FindFirstChildOfClass("Humanoid") then
  65. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  66. end
  67. part:Destroy()
  68. part = clone
  69. elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then
  70. plr.Character.Parent = workspace
  71. plr.Character.Archivable = false
  72. plr.Character:FindFirstChildOfClass("ForceField"):Remove()
  73. for y,t in pairs(plr.Character:GetChildren()) do
  74. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  75. t.Transparency = 0
  76. if t.Name == "Head" and t:FindFirstChild("face") then
  77. t.face.Transparency = 0
  78. end
  79. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  80. t.Handle.Transparency = 0
  81. end
  82. end
  83. end
  84. end)
  85. mouse.Button1Down:connect(function()
  86. if plr.Character.Parent == workspace.Camera then
  87. if mouse ~= nil then
  88. if mouse.Target ~= nil then
  89. part = mouse.Target
  90. bp = Instance.new("BodyPosition",part)
  91. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  92. bp.Position = part.Position
  93. particles = Instance.new("ParticleEmitter",part)
  94. particles.Color = ColorSequence.new(Color3.new(0,0,0))
  95. particles.Size = NumberSequence.new(1)
  96. particles.Texture = "rbxassetid://292289455"
  97. particles.VelocitySpread = 360
  98. particles.Speed = NumberRange.new(0)
  99. particles.RotSpeed = NumberRange.new(0)
  100. particles.Rotation = NumberRange.new(0)
  101. particles.Rate = 250
  102. particles.Lifetime = NumberRange.new(.2,.4)
  103. particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
  104. dwn = true
  105. end
  106. end
  107. while dwn == true do
  108. wait()
  109. bp.Position = mouse.hit.p
  110. if part then
  111. if part.Parent:FindFirstChildOfClass("Humanoid") then
  112. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  113. end
  114. end
  115. end
  116. end
  117. end)
  118. mouse.Button1Up:connect(function()
  119. dwn = false
  120. if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
  121. if bp then bp:Destroy() end
  122. if particles then particles:Destroy() end
  123. end)
  124. base = Instance.new("ScreenGui",plr.PlayerGui)
  125. bbg = Instance.new("BillboardGui",plr.Character.Head)
  126. bbg.Size = UDim2.new(0,200,0,50)
  127. bbg.StudsOffset = Vector3.new(0,3,0)
  128. bbgTl = Instance.new("TextLabel",bbg)
  129. bbgTl.BackgroundTransparency = 1
  130. bbgTl.Size = UDim2.new(10,0,1,0)
  131. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  132. bbgTl.Font = "Code"
  133. bbgTl.Text = " "
  134. bbgTl.TextSize = 25
  135. bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
  136. bbgTl.TextColor3 = Color3.new(0,0,0)
  137. bbgTl.TextStrokeTransparency = 0
  138. bbgTl.TextWrapped = true
  139. plr.Chatted:connect(function(msg)
  140. bbgTl.Text = msg
  141. wait(5)
  142. if bbgTl.Text == msg then
  143. bbgTl.Text = " "
  144. end
  145. end)
  146. touchCounter = 0
  147. while wait() do
  148. if plr.Character.Parent == workspace.Camera then
  149. local c = plr.Character:Clone()
  150. c:MakeJoints()
  151. for y,t in pairs(c:GetChildren()) do
  152. if t:IsA("Part") then
  153. t.CanCollide = false
  154. t.Anchored = true
  155. t.Transparency = .5
  156. t.TopSurface = "Smooth"
  157. t.BottomSurface = "Smooth"
  158. t.RightSurface = "Smooth"
  159. t.LeftSurface = "Smooth"
  160. t.FrontSurface = "Smooth"
  161. t.BackSurface = "Smooth"
  162. t.BrickColor = BrickColor.new("Really black")
  163. if t.Name == "Head" and t:FindFirstChild("face") then
  164. t.face:Remove()
  165. elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
  166. t.roblox:Remove()
  167. elseif t.Name == "HumanoidRootPart" then
  168. t:Remove()
  169. end
  170. else
  171. t:Remove()
  172. end
  173. end
  174. c.Parent = workspace
  175. game.Debris:AddItem(c,.05)
  176. end
  177. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement