Advertisement
timmie140

Moon hopper

Nov 23rd, 2024 (edited)
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.53 KB | None | 0 0
  1. -- Full Moon Finder Script with Stealth Enhancements
  2.  
  3. -- Configurations
  4. local WebhookURL = "https://discord.com/api/webhooks/1291821412188819516/d5kzcxW1RI9dSiXBmlwEiduyJalAjSFREm8lu0viDOospXitP5QQyTIAu8g3m0jWaAkk"
  5. local VisitedFileName = "VisitedServers.txt" -- File to save visited servers
  6. local hopDelay = math.random(5, 15) -- Randomized delay before hopping
  7. local recheckDelay = math.random(45, 90) -- Randomized delay between moon checks
  8.  
  9. -- Services
  10. local Lighting = game:GetService("Lighting")
  11. local Players = game:GetService("Players")
  12. local TeleportService = game:GetService("TeleportService")
  13. local HttpService = game:GetService("HttpService")
  14.  
  15. local PlaceId = game.PlaceId
  16. local CurrentJobId = game.JobId
  17.  
  18. -- GUI Setup (Minimal Impact)
  19. local moonLabel = Instance.new("TextLabel")
  20. moonLabel.Size = UDim2.new(0, 300, 0, 50)
  21. moonLabel.Position = UDim2.new(0.5, -150, 0, 10)
  22. moonLabel.TextSize = 18
  23. moonLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  24. moonLabel.BackgroundTransparency = 1
  25. moonLabel.Text = "MOON: Waiting..."
  26. moonLabel.Visible = false -- Make GUI invisible to avoid detection
  27. moonLabel.Parent = game.CoreGui
  28.  
  29. -- Moon Phases
  30. local MoonPhases = {
  31.     ["1"] = {Icon = "๐ŸŒ”", TextureId = "http://www.roblox.com/asset/?id=9709149680"},
  32.     ["2"] = {Icon = "๐ŸŒ“", TextureId = "http://www.roblox.com/asset/?id=9709150086"},
  33.     ["3"] = {Icon = "๐ŸŒ’", TextureId = "http://www.roblox.com/asset/?id=9709139597"},
  34.     ["4"] = {Icon = "๐ŸŒ‘", TextureId = "http://www.roblox.com/asset/?id=9709135895"},
  35.     ["5"] = {Icon = "๐ŸŒ˜", TextureId = "http://www.roblox.com/asset/?id=9709150401"},
  36.     ["6"] = {Icon = "๐ŸŒ—", TextureId = "http://www.roblox.com/asset/?id=9709143733"},
  37.     ["7"] = {Icon = "๐ŸŒ–", TextureId = "http://www.roblox.com/asset/?id=9709149052"},
  38.     ["8"] = {Icon = "๐ŸŒ•", TextureId = "http://www.roblox.com/asset/?id=9709149431"}
  39. }
  40.  
  41. -- Save server data
  42. local function ReadVisitedServers()
  43.     local visited = {}
  44.     pcall(function()
  45.         local content = readfile(VisitedFileName)
  46.         for jobId in string.gmatch(content, "[^\n]+") do
  47.             visited[jobId] = true
  48.         end
  49.     end)
  50.     return visited
  51. end
  52.  
  53. local function SaveVisitedServer(jobId)
  54.     pcall(function()
  55.         appendfile(VisitedFileName, jobId .. "\n")
  56.     end)
  57. end
  58.  
  59. -- Detect moon phase
  60. local function GetMoonPhase()
  61.     local Sky = Lighting:FindFirstChild("Sky")
  62.     if Sky then
  63.         for phase, data in pairs(MoonPhases) do
  64.             if Sky.MoonTextureId == data.TextureId then
  65.                 return tonumber(phase), data.Icon
  66.             end
  67.         end
  68.     end
  69.     return nil
  70. end
  71.  
  72. -- Server hop logic
  73. local function AutoServerHop()
  74.     local visitedServers = ReadVisitedServers()
  75.     local foundServer = false
  76.  
  77.     local success, servers = pcall(function()
  78.         return HttpService:JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/" .. PlaceId .. "/servers/Public?sortOrder=Asc&limit=100"))
  79.     end)
  80.  
  81.     if success and servers and servers.data then
  82.         for _, server in ipairs(servers.data) do
  83.             if not visitedServers[server.id] and server.id ~= CurrentJobId and server.playing < server.maxPlayers then
  84.                 if server.friendsPlaying and #server.friendsPlaying > 0 then
  85.                     continue
  86.                 end
  87.                 foundServer = true
  88.                 SaveVisitedServer(server.id)
  89.                 TeleportService:TeleportToPlaceInstance(PlaceId, server.id)
  90.                 break
  91.             end
  92.         end
  93.     else
  94.         warn("Failed to retrieve servers.")
  95.     end
  96.  
  97.     if not foundServer then
  98.         warn("No valid server found. Rejoining.")
  99.         SaveVisitedServer(CurrentJobId)
  100.         TeleportService:Teleport(PlaceId)
  101.     end
  102. end
  103.  
  104. -- Check and hop if needed
  105. local function CheckMoonPhaseAndHop()
  106.     local moonPhase, moonIcon = GetMoonPhase()
  107.     if moonPhase then
  108.         moonLabel.Text = "MOON: " .. moonIcon
  109.         if moonPhase ~= 7 and moonPhase ~= 8 then
  110.             wait(math.random(1, 5)) -- Random wait to avoid predictable behavior
  111.             AutoServerHop()
  112.         end
  113.     else
  114.         moonLabel.Text = "MOON: Unknown"
  115.     end
  116. end
  117.  
  118. -- Stealth enhancements
  119. local function AntiAFK()
  120.     local VirtualUser = game:GetService("VirtualUser")
  121.     Players.LocalPlayer.Idled:Connect(function()
  122.         VirtualUser:CaptureController()
  123.         VirtualUser:ClickButton2(Vector2.new())
  124.     end)
  125. end
  126.  
  127. -- Main loop
  128. AntiAFK() -- Prevent AFK detection
  129. while true do
  130.     CheckMoonPhaseAndHop()
  131.     wait(recheckDelay)
  132. end
  133.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement