IMTHEBO2

testThing

Aug 2nd, 2024 (edited)
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.55 KB | None | 0 0
  1. local storage = game:GetService("ReplicatedStorage")
  2. local StarterGui = game:GetService("StarterGui")
  3. local Players = game:GetService("Players")
  4. local run = game:GetService("RunService")
  5. local http = game:GetService("HttpService")
  6. local plr = Players.LocalPlayer
  7. local storages = {
  8.     pokes = workspace:WaitForChild("Pokemons"),
  9.     gifts = workspace:WaitForChild("Gifts"),
  10.     stops = workspace:WaitForChild("Pokestops")
  11. }
  12. local pokeData = run:IsStudio() and {} or require(storage.PokemonData)
  13. local char = plr.Character or plr.CharacterAdded:wait()
  14. local opts = {
  15.     playersHidden = false,
  16. }
  17.  
  18. local function aOrAn(str, upper)
  19.     local vowels = {
  20.         a = true,
  21.         e = true,
  22.         i = true,
  23.         o = true,
  24.         u = true
  25.     }
  26.  
  27.     if vowels[str:sub(1, 1):lower()] then
  28.         return (upper and "An " or "an ") .. str
  29.     end
  30.     return (upper and "A " or "a ") .. str
  31. end
  32.  
  33. local function setupESPOpts(loc, tab, t, def)
  34.     local highlightOptsKey = t.."HighlightOpts"
  35.     local highlightedObjs = {}
  36.    
  37.     opts[highlightOptsKey] = def or {}
  38.     opts[highlightOptsKey].Enabled = false
  39.    
  40.     local function updateESPHighlightProp(name, val)
  41.         opts[highlightOptsKey][name] = val
  42.         for _, h in pairs(highlightedObjs) do h[name] = val end
  43.     end
  44.    
  45.     local function addToHighlighted(obj)
  46.         local h = Instance.new("Highlight", obj)
  47.  
  48.         for k, v in pairs(opts[highlightOptsKey]) do h[k] = v end
  49.         highlightedObjs[obj] = h
  50.         obj.Destroying:Connect(function() highlightedObjs[obj] = nil end)
  51.     end
  52.    
  53.     tab:Toggle(t.." ESP", "Highlights all "..t:lower()..".", opts[highlightOptsKey].Enabled, function(v)
  54.         updateESPHighlightProp("Enabled", v)
  55.     end)
  56.  
  57.     tab:Colorpicker(t.." ESP Color", opts[highlightOptsKey].FillColor, function(v)
  58.         updateESPHighlightProp("FillColor", v)
  59.     end)
  60.  
  61.     tab:Colorpicker(t.." ESP Outline Color", opts[highlightOptsKey].OutlineColor, function(v)
  62.         updateESPHighlightProp("OutlineColor", v)
  63.     end)
  64.    
  65.     loc.ChildAdded:Connect(function(ch)
  66.         print("child added", ch.Name)
  67.         addToHighlighted(ch)
  68.     end)
  69.    
  70.     local current = loc:GetChildren()
  71.    
  72.     if #current < 1 then return end
  73.     for i, v in pairs(current) do addToHighlighted(v) end
  74. end
  75.  
  76. local function setupTPNotifOpts(loc, tab, t, fn)
  77.     local optKey = "spawn"..t.."Notif"
  78.    
  79.     tab:Toggle(t.." Spawn Notif", "Sends you a notification when a "..t:lower().." is spawned with option to tp to it.", false, function(v)
  80.         opts[optKey] = v
  81.     end)
  82.    
  83.     local function tryNotify(ch)
  84.         if not opts[optKey] then return end
  85.         if fn and not fn(ch) then return end
  86.        
  87.         local bind = Instance.new("BindableFunction")
  88.  
  89.         local function removeBind()
  90.             if not bind then return end
  91.             bind:Destroy()
  92.             bind = nil
  93.         end
  94.  
  95.         bind.OnInvoke = function(t)
  96.             if t == "Teleport" then char:MoveTo(ch:GetPivot().p) end
  97.             removeBind()
  98.         end
  99.  
  100.         delay(8, removeBind)
  101.         StarterGui:SetCore("SendNotification", {
  102.             Title = aOrAn(ch.Name, true).." has spawned!",
  103.             Text = "Teleport to it?",
  104.             Icon = t == "Rare Pokemon" and "rbxassetid://"..pokeData[ch.Name].Icon or nil,
  105.             Callback = bind,
  106.             Button1 = "Teleport",
  107.             Button2 = "Cancel",
  108.         })
  109.     end
  110.    
  111.     loc.ChildAdded:Connect(tryNotify)
  112.    
  113.     local current = loc:GetChildren()
  114.  
  115.     if #current < 1 then return end
  116.     for i, v in pairs(current) do tryNotify(v) end
  117. end
  118.  
  119. local function setHidePlayers(val)
  120.     if opts.playersHidden == val then return end
  121.    
  122.     opts.playersHidden = val
  123.     for i, p in pairs(Players:GetPlayers()) do
  124.         local c = p.Character or p.CharacterAdded:wait()
  125.         if p ~= plr then c.Parent = val and storage or workspace end
  126.     end
  127. end
  128.  
  129. local priority = {"Mew", "Mewtwo"}
  130.  
  131. local function getMon(mons)
  132.     local chosenMon = mons[math.random(#mons)]
  133.  
  134.     for i, mon in pairs(mons) do
  135.         if table.find(priority, mon.Name) then
  136.             chosenMon = mon
  137.             break
  138.         end
  139.     end
  140.  
  141.     return chosenMon
  142. end
  143. -- loadstring(game:HttpGet("https://pastebin.com/raw/qYJATtJG"))()
  144. local Flux = run:IsStudio() and require(script.Flux) or loadstring(game:HttpGet("https://pastebin.com/raw/3t9Y5n8m"))()
  145. --local toggle = Instance.new("ImageButton", Flux.ui)
  146.  
  147. --toggle.Size = UDim2.new(0, 70, 0, 70)
  148. --toggle.BackgroundTransparency = 1
  149. --toggle.Image = "rbxassetid://14395998322"
  150.  
  151. local win = Flux:Window("BGC Hax", "PO: GO | v1.0.0", Color3.fromRGB(48, 110, 255), Enum.KeyCode.LeftControl --[[, toggle]])
  152. local tab = win:Tab("Pokemon", "rbxassetid://6023426915")
  153. local mons_dd, nLabelUpdateFn
  154. local lastUpdate = storages.pokes:GetChildren()
  155. local idToMon
  156.  
  157. local function updateMons()
  158.     local mons = {}
  159.    
  160.     mons_dd:Clear()
  161.     mons_dd:Add("Random")
  162.     lastUpdate = storages.pokes:GetChildren()
  163.     idToMon = {}
  164.    
  165.     for i, mon in pairs(lastUpdate) do
  166.         local uniqueId = http:GenerateGUID(false)
  167.         idToMon[uniqueId] = mon
  168.         mons_dd:Add(mon.Name.." | "..uniqueId)
  169.     end
  170. end
  171.  
  172. local function checkMonUpdate()
  173.     local spawned = storages.pokes:GetChildren()
  174.     nLabelUpdateFn("There "..(#spawned == 1 and "is" or "are").." currently ".. #spawned .." spawned pokemon.")
  175.     if #spawned ~= #lastUpdate then
  176.         updateMons()
  177.     else
  178.         for i, mon in pairs(spawned) do
  179.             if not table.find(lastUpdate, mon)  then updateMons() break end
  180.         end
  181.     end
  182. end
  183.  
  184. nLabelUpdateFn = tab:Label("Loading...")
  185. mons_dd = tab:Dropdown("Spawned Mons TP", {"1", "2", "3"}, function(t)
  186.     local id = t ~= "Random" and string.split(t, " | ")[2] or nil
  187.     local all = storages.pokes:GetChildren()
  188.     local mon = t == "Random" and all[math.random(#all)] or idToMon[id]
  189.    
  190.     if #all < 1 then
  191.         Flux:Notification("There are no pokemon spawned currently.", "Alright")
  192.         return
  193.     end
  194.    
  195.     if mon then char:MoveTo(mon:GetPivot().p) end
  196. end)
  197.  
  198. updateMons()
  199.  
  200. setupTPNotifOpts(storages.pokes, tab, "Rare Pokemon", function(obj)
  201.     return pokeData[obj.Name] and table.find({"Mew", "Mewtwo", "Ditto", "Articuno", "Zapdos", "Moltress"}, obj.Name)
  202. end)
  203.  
  204. local catchCamCn = run:IsStudio() and {} or getconnections(storage.catch_cam.OnClientEvent)[1]
  205.  
  206. tab:Toggle("Catch Camera", "Disable or Enable the camera lock when you catch a pokemon.", true, function(t)
  207.     catchCamCn[t and "Enable" or "Disable"](catchCamCn)
  208. end)
  209.  
  210. setupESPOpts(storages.pokes, tab, "Pokemon", {
  211.     FillColor = Color3.fromRGB(0, 0, 255),
  212.     OutlineColor = Color3.fromRGB(48, 110, 255),
  213. })
  214.  
  215. -- highlightExtras
  216.  
  217. local tab2 = win:Tab("Gifts", "rbxassetid://6023426915")
  218.  
  219. local ignoredGifts, opened = {}, {}
  220.  
  221. local function tryOpenGifts(gifts)
  222.     if not opts.autoGifts then return end
  223.     local didOpen = 0
  224.  
  225.     local function open(gift)
  226.         local detector = gift:FindFirstChildOfClass("ClickDetector")
  227.  
  228.         if detector then
  229.             print(gift.Name)
  230.             fireclickdetector(detector)
  231.             table.insert(opened, gift)
  232.             didOpen += 1
  233.         end
  234.     end
  235.  
  236.     for i, gift in pairs(gifts) do
  237.         if not ignoredGifts[gift.Name] and not table.find(opened, gift) then
  238.             open(gift)
  239.         end
  240.     end
  241.  
  242.     for i, v in pairs(opened) do
  243.         if not v.Parent then table.remove(opened, i) end
  244.     end
  245.  
  246.     return didOpen
  247. end
  248.  
  249.  
  250. tab2:Toggle("Auto Open Gifts", "Automatically open gifts as soon as they spawn.", function(t)
  251.     opts.autoGifts = t
  252. end)
  253.  
  254. spawn(function()
  255.     while wait() do
  256.         checkMonUpdate()
  257.         tryOpenGifts()
  258.     end
  259. end)
  260.  
  261. setupTPNotifOpts(storages.gifts, tab2, "Gift")
  262. setupESPOpts(storages.gifts, tab2, "Gifts",{
  263.     FillColor = Color3.fromRGB(255, 0, 0),
  264.     OutlineColor = Color3.fromRGB(255, 48, 110),
  265. })
  266.  
  267. local tab3 = win:Tab("Pokestops", "rbxassetid://6023426915")
  268.  
  269. tab3:Label("Coming Soon...")
  270.  
  271. local tab4 = win:Tab("Misc", "rbxassetid://6023426915")
  272.  
  273. tab4:Button("Get All Codes Tools", "Gives you all the tools connected to codes.", function()
  274.     local base = "Succesfully given: "
  275.     local givenStr = base
  276.    
  277.     for i, tool in pairs(storage.Codes:GetChildren()) do
  278.         if not plr.Backpack:FindFirstChild(tool.Name) then
  279.             storage.CodeGive:FireServer(tool.Name)
  280.             givenStr ..= (givenStr ~= base and "," or "") .. tool.Name
  281.         end
  282.     end
  283.    
  284.     Flux:Notification(givenStr ~= base and givenStr.." code tools!" or "You already have all the code tools!", "Alright")
  285. end)
  286.  
  287. local teams, teamToSpawn = {}, {}
  288.  
  289. for i, team in pairs(game:GetService("Teams"):GetChildren()) do
  290.     local teamName = string.sub(team.Name, 6)
  291.    
  292.     for i, obj in pairs(workspace:GetChildren()) do
  293.         if obj:IsA("SpawnLocation") and obj.BrickColor == team.TeamColor and not teamToSpawn[teamName] then
  294.             teamToSpawn[teamName] = obj
  295.             table.insert(teams, teamName)  
  296.         end
  297.     end
  298. end
  299.  
  300. tab4:Dropdown("Change Team", teams, function(t)
  301.     local spwn = teamToSpawn[t]
  302.     local oldPos = char:WaitForChild("HumanoidRootPart").Position
  303.    
  304.     setHidePlayers(true)
  305.     char:MoveTo(spwn.Position)
  306.     wait()
  307.     setHidePlayers(false)
  308.     char:MoveTo(oldPos)
  309. end)
  310.  
  311. tab4:Toggle("Hide Players", "Hides all the other players.", false, setHidePlayers)
Advertisement
Add Comment
Please, Sign In to add comment