Advertisement
Zach_script_stealer2

Ghost

Sep 29th, 2019
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.87 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. print(" this script was converted by An ignorant / zach ")
  3. warn(" credits goes to real creators ")
  4. warn(" pls dont abuse ")
  5. warn(" i beg u ")
  6. local Player,game,owner = owner,game
  7. local RealPlayer = Player
  8. do
  9. print("FE Compatibility code by Mokiros")
  10. local rp = RealPlayer
  11. script.Parent = rp.Character
  12.  
  13. --RemoteEvent for communicating
  14. local Event = Instance.new("RemoteEvent")
  15. Event.Name = "UserInput_Event"
  16.  
  17. --Fake event to make stuff like Mouse.KeyDown work
  18. local function fakeEvent()
  19. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  20. t.connect = t.Connect
  21. return t
  22. end
  23.  
  24. --Creating fake input objects with fake variables
  25. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  26. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  27. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  28. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  29. end}
  30. --Merged 2 functions into one by checking amount of arguments
  31. CAS.UnbindAction = CAS.BindAction
  32.  
  33. --This function will trigger the events that have been :Connect()'ed
  34. local function te(self,ev,...)
  35. local t = m[ev]
  36. if t and t._fakeEvent then
  37. for _,f in pairs(t.Functions) do
  38. f(...)
  39. end
  40. end
  41. end
  42. m.TrigEvent = te
  43. UIS.TrigEvent = te
  44.  
  45. Event.OnServerEvent:Connect(function(plr,io)
  46. if plr~=rp then return end
  47. m.Target = io.Target
  48. m.Hit = io.Hit
  49. if not io.isMouse then
  50. local b = io.UserInputState == Enum.UserInputState.Begin
  51. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  52. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then return s[k] end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end,
  103. __call = function(self,...)
  104. local s = rawget(self,"_RealService")
  105. if s then return s(...) end
  106. end
  107. }
  108. local function FakeService(t,RealService)
  109. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  110. return setmetatable(t,fsmt)
  111. end
  112.  
  113. --Fake game object
  114. local g = {
  115. GetService = function(self,s)
  116. return self[s]
  117. end,
  118. Players = FakeService({
  119. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  120. },"Players"),
  121. UserInputService = FakeService(UIS,"UserInputService"),
  122. ContextActionService = FakeService(CAS,"ContextActionService"),
  123. }
  124. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  125. g.service = g.GetService
  126.  
  127. g.RunService = FakeService({
  128. RenderStepped = _rg:GetService("RunService").Heartbeat,
  129. BindToRenderStep = function(self,name,_,fun)
  130.  
  131. end,
  132. UnbindFromRenderStep = function(self,name)
  133. self._btrs[name]:Disconnect()
  134. end,
  135. },"RunService")
  136.  
  137. setmetatable(g,{
  138. __index=function(self,s)
  139. return _rg:GetService(s) or typeof(_rg[s])=="function"
  140. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  141. end,
  142. __newindex = fsmt.__newindex,
  143. __call = fsmt.__call
  144. })
  145. --Changing owner to fake player object to support owner:GetMouse()
  146. game,owner = g,g.Players.LocalPlayer
  147. end
  148.  
  149.  
  150. plr = game.Players.LocalPlayer
  151. mouse = plr:GetMouse()
  152. part = nil
  153. bp = nil
  154. particles = nil
  155. function clerp(a,b,c,d)
  156. for i = 0,d,.01 do
  157. a.CFrame = CFrame.new(b:lerp(c,i))
  158. wait()
  159. end
  160. end
  161. function slerp(a2,b2,c2,d2)
  162. for i2 = 0,d2,.01 do
  163. a2.CFrame = CFrame.new(b2:lerp(c2,i2))
  164. wait()
  165. end
  166. end
  167. mouse.KeyDown:connect(function(key)
  168. if key == "e" and plr.Character.Parent == workspace then
  169. plr.Character.Parent = workspace.Camera
  170. plr.Character.Archivable = true
  171. Instance.new("ForceField",plr.Character).Visible = false
  172. for y,t in pairs(plr.Character:GetChildren()) do
  173. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  174. t.Transparency = 1
  175. if t.Name == "Head" and t:FindFirstChild("face") then
  176. t.face.Transparency = 1
  177. end
  178. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  179. t.Handle.Transparency = 1
  180. end
  181. end
  182. elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
  183. 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)
  184. elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then
  185. if plr.Character.Torso.Anchored == true then
  186. for y,t in pairs(plr.Character:GetChildren()) do
  187. if t:IsA("Part") then
  188. t.Anchored = false
  189. end
  190. end
  191. else
  192. for y,t in pairs(plr.Character:GetChildren()) do
  193. if t:IsA("Part") then
  194. t.Anchored = true
  195. end
  196. end
  197. end
  198. elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then
  199. local clone = part:Clone()
  200. clone.Parent = workspace
  201. clone.Anchored = false
  202. clone:ClearAllChildren()
  203. clone.CanCollide = true
  204. bp.Parent = clone
  205. particles.Parent = clone
  206. if part.Parent:FindFirstChildOfClass("Humanoid") then
  207. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  208. end
  209. part:Destroy()
  210. part = clone
  211. elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then
  212. plr.Character.Parent = workspace
  213. plr.Character.Archivable = false
  214. plr.Character:FindFirstChildOfClass("ForceField"):Remove()
  215. for y,t in pairs(plr.Character:GetChildren()) do
  216. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  217. t.Transparency = 0
  218. if t.Name == "Head" and t:FindFirstChild("face") then
  219. t.face.Transparency = 0
  220. end
  221. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  222. t.Handle.Transparency = 0
  223. end
  224. end
  225. end
  226. end)
  227. mouse.Button1Down:connect(function()
  228. if plr.Character.Parent == workspace.Camera then
  229. if mouse ~= nil then
  230. if mouse.Target ~= nil then
  231. part = mouse.Target
  232. bp = Instance.new("BodyPosition",part)
  233. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  234. bp.Position = part.Position
  235. particles = Instance.new("ParticleEmitter",part)
  236. particles.Color = ColorSequence.new(Color3.new(0,0,0))
  237. particles.Size = NumberSequence.new(1)
  238. particles.Texture = "rbxassetid://292289455"
  239. particles.VelocitySpread = 360
  240. particles.Speed = NumberRange.new(0)
  241. particles.RotSpeed = NumberRange.new(0)
  242. particles.Rotation = NumberRange.new(0)
  243. particles.Rate = 250
  244. particles.Lifetime = NumberRange.new(.2,.4)
  245. particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
  246. dwn = true
  247. end
  248. end
  249. while dwn == true do
  250. wait()
  251. bp.Position = mouse.hit.p
  252. if part then
  253. if part.Parent:FindFirstChildOfClass("Humanoid") then
  254. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  255. end
  256. end
  257. end
  258. end
  259. end)
  260. mouse.Button1Up:connect(function()
  261. dwn = false
  262. if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
  263. if bp then bp:Destroy() end
  264. if particles then particles:Destroy() end
  265. end)
  266. base = Instance.new("ScreenGui",plr.PlayerGui)
  267. bbg = Instance.new("BillboardGui",plr.Character.Head)
  268. bbg.Size = UDim2.new(0,200,0,50)
  269. bbg.StudsOffset = Vector3.new(0,3,0)
  270. bbgTl = Instance.new("TextLabel",bbg)
  271. bbgTl.BackgroundTransparency = 1
  272. bbgTl.Size = UDim2.new(10,0,1,0)
  273. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  274. bbgTl.Font = "Code"
  275. bbgTl.Text = " "
  276. bbgTl.TextSize = 25
  277. bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
  278. bbgTl.TextColor3 = Color3.new(0,0,0)
  279. bbgTl.TextStrokeTransparency = 0
  280. bbgTl.TextWrapped = true
  281. plr.Chatted:connect(function(msg)
  282. bbgTl.Text = msg
  283. wait(5)
  284. if bbgTl.Text == msg then
  285. bbgTl.Text = " "
  286. end
  287. end)
  288. touchCounter = 0
  289. while wait() do
  290. if plr.Character.Parent == workspace.Camera then
  291. local c = plr.Character:Clone()
  292. c:MakeJoints()
  293. for y,t in pairs(c:GetChildren()) do
  294. if t:IsA("Part") then
  295. t.CanCollide = false
  296. t.Anchored = true
  297. t.Transparency = .5
  298. t.TopSurface = "Smooth"
  299. t.BottomSurface = "Smooth"
  300. t.RightSurface = "Smooth"
  301. t.LeftSurface = "Smooth"
  302. t.FrontSurface = "Smooth"
  303. t.BackSurface = "Smooth"
  304. t.BrickColor = BrickColor.new("Really black")
  305. if t.Name == "Head" and t:FindFirstChild("face") then
  306. t.face:Remove()
  307. elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
  308. t.roblox:Remove()
  309. elseif t.Name == "HumanoidRootPart" then
  310. t:Remove()
  311. end
  312. else
  313. t:Remove()
  314. end
  315. end
  316. c.Parent = workspace
  317. game.Debris:AddItem(c,.05)
  318. end
  319. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement