Advertisement
Honansik

Ghost Simulator Auto Farm Script

Jan 17th, 2022
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.57 KB | None | 0 0
  1. -- Variable
  2.  
  3. local player = game.Players.LocalPlayer
  4.  
  5. _G.Enabled = true
  6. local ghostN = "Fairy" -- you can find all name in Workspace.Ghost
  7. local GhostsFolder = game.Workspace.Ghosts
  8. local bLocation
  9.  
  10.  
  11. -- function
  12.  
  13. function teleport(loc) -- Nymphoria on v3rmillion.net
  14.    bLocation = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  15.    if game.Players.LocalPlayer.Character.Humanoid.Sit then
  16.        game.Players.LocalPlayer.Character.Humanoid.Sit = false
  17.    end
  18.    wait()
  19.    game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = loc
  20. end
  21.  
  22. --Autofarm
  23. while true do
  24.     if _G.Enabled == true then
  25.             if GhostsFolder[ghostN]:FindFirstChild("HumanoidRootPart") and GhostsFolder[ghostN]:FindFirstChild("EnemyHumanoid") and GhostsFolder[ghostN].Health.Value > 0 and player.Character:FindFirstChild("HumanoidRootPart") then
  26.                 repeat
  27.                     if player.Character:FindFirstChild("HumanoidRootPart") and GhostsFolder[ghostN]:FindFirstChild("HumanoidRootPart") then
  28.                         player.Character.HumanoidRootPart.CFrame = GhostsFolder[ghostN].HumanoidRootPart.CFrame * CFrame.new(0,0,5)
  29.                     end
  30.                     wait()
  31.                    
  32.                     local remote = game:GetService("ReplicatedStorage").Network.ToServer.Requests.VacuumEnemy
  33.                     remote:FireServer(GhostsFolder[ghostN])
  34.  
  35.                 until v == nil or v.Parent == nil or not GhostsFolder[ghostN]:FindFirstChild("EnemyHumanoid") or GhostsFolder[ghostN].Health.Value <= 0
  36.             end
  37.     end
  38.     wait()
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement