Advertisement
1x1x1x1IAMbck

Ninja Legends 2 Trash lol

Dec 31st, 2020
1,213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.58 KB | None | 0 0
  1. --// Local Variables
  2. _G.AutoBuySwords = false
  3. _G.AutoBuyCrystals = false
  4. _G.AutoSwing = false
  5. _G.Collect = false
  6. _G.AutoPlanet = false
  7.  
  8. local bestPlanet = "Planet Elemental" -- Always use full name. This is used for the auto-buy thingies since am dumb and can´t make it auto update lol
  9.  
  10. local plr = game.Players.LocalPlayer
  11. local sellareas = game:GetService("Workspace"):WaitForChild("sellAreaCircles")
  12. local Event = game:GetService("Players").LocalPlayer.saberEvent
  13. local char = plr.Character or plr.CharacterAdded:wait()
  14. local hrp = char:WaitForChild("HumanoidRootPart")
  15. local planets = game:GetService("Workspace").planetOuters
  16.  
  17. --// Anti-AFK Kick ig
  18. local bb=game:service'VirtualUser'
  19. game:service'Players'.LocalPlayer.Idled:connect(function()
  20.     bb:CaptureController()
  21.     bb:ClickButton2(Vector2.new())
  22. end)
  23.  
  24. --// Set-Ups
  25. local PLANETTTS = coroutine.wrap(function()
  26.     while wait(0.4) do
  27.         if _G.AutoPlanet == true then
  28.             for i, v in pairs(planets:GetDescendants()) do
  29.                 if v:IsA("BasePart") and v.Name == "centerPart" then
  30.                     if not plr:WaitForChild("foundPlanets"):FindFirstChild(v.Parent.Name) then
  31.                         hrp.CFrame = v.CFrame
  32.                     end
  33.                 end
  34.             end
  35.         end
  36.     end
  37. end)
  38. PLANETTTS()
  39.  
  40. local swinging = coroutine.wrap(function()
  41.     while wait() do
  42.         if _G.AutoSwing == true then
  43.             local swing = "swingBlade"
  44.             Event:FireServer(swing)
  45.         end
  46.     end
  47. end)
  48. swinging()
  49.  
  50. local buysword = coroutine.wrap(function()
  51.     while wait() do
  52.         if _G.AutoBuySwords == true then
  53.             if plr.Backpack:FindFirstChildOfClass("Tool") then
  54.                 plr.Backpack:FindFirstChildOfClass("Tool").Parent = char
  55.             end
  56.             local autobuyswords = "buyAllItems"
  57.             local sworddesc = {
  58.                 ["whichItems"] = "Swords";
  59.                 ["whichPlanet"] = bestPlanet
  60.             }
  61.             Event:FireServer(autobuyswords,sworddesc)
  62.         end
  63.     end
  64. end)
  65. buysword()
  66.  
  67. local buycrystal = coroutine.wrap(function()
  68.     while wait() do
  69.         if _G.AutoBuyCrystals == true then
  70.             local autobuyswords = "buyAllItems"
  71.             local sworddesc = {
  72.                 ["whichItems"] = "Crystals";
  73.                 ["whichPlanet"] = bestPlanet
  74.             }
  75.             Event:FireServer(autobuyswords,sworddesc)
  76.         end
  77.     end
  78. end)
  79. buycrystal()
  80.  
  81. local collector = coroutine.wrap(function()
  82.     while wait(0.5) do
  83.         if _G.Collect == true then
  84.             local coinos = game:GetService("Workspace").spawnedCoins
  85.             local spawns = game:GetService("Workspace").coinSpawns
  86.             for i, v in pairs(coinos:GetDescendants()) do
  87.                 if v:IsA("BasePart") and v.Name == "Base" then
  88.                     if v.Parent.Parent.spawnValue.Value.Used.Value == false then
  89.                         hrp.CFrame = v.CFrame
  90.                     end
  91.                 end
  92.             end
  93.         end
  94.     end
  95. end)
  96. collector()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement