ScriptsQP

Untitled

Jun 11th, 2024
696
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.91 KB | None | 0 0
  1. --[[
  2.  
  3. Made by griffindoescooking
  4.  
  5. ]]--
  6.  
  7. print("Pet Simulator 99 | griffindoescooking")
  8. warn('This removes require functions and the "Collect Orbs" toggle')
  9.  
  10. repeat
  11. task.wait()
  12. until game:IsLoaded()
  13. if game.PlaceId ~= 8737899170 and game.PlaceId ~= 16498369169 then
  14. game.Players.LocalPlayer:Kick("wrong game")
  15. end
  16.  
  17. local mapName = ""
  18. if game.PlaceId == 8737899170 then
  19. mapName = "Map"
  20. elseif game.PlaceId == 16498369169 then
  21. mapName = "Map2"
  22. end
  23.  
  24. -- Compatibility Check
  25.  
  26. local function checkFunctions()
  27. local functionNames = ""
  28. if not isfile then
  29. functionNames = functionNames.."isfile "
  30. end
  31. if not writefile then
  32. functionNames = functionNames.."writefile "
  33. end
  34. if not readfile then
  35. functionNames = functionNames.."readfile "
  36. end
  37. if not isfolder then
  38. functionNames = functionNames.."isfolder "
  39. end
  40. if not makefolder then
  41. functionNames = functionNames.."makefolder "
  42. end
  43. if not cloneref then
  44. functionNames = functionNames.."cloneref "
  45. end
  46. if not setclipboard then
  47. functionNames = functionNames.."setclipboard "
  48. end
  49. if not identifyexecutor then
  50. functionNames = functionNames.."identifyexecutor "
  51. end
  52. return functionNames
  53. end
  54. local function output(text: string, type: string)
  55. local outputTag = "[griffindoescooking] "
  56. type = type or "print"
  57. pcall(function()
  58. if type == "print" then
  59. print(outputTag..text)
  60. elseif type == "warn" then
  61. warn(outputTag..text)
  62. elseif type == "error" then
  63. error(outputTag..text)
  64. end
  65. end)
  66. end
  67.  
  68. local missingFunctions = checkFunctions()
  69. if missingFunctions ~= "" then
  70. return output("Missing: "..missingFunctions, "error")
  71. end
  72.  
  73. -- Variables
  74.  
  75. local LocalPlayer = game.Players.LocalPlayer
  76. local HumanoidRootPart = LocalPlayer.Character:FindFirstChild("HumanoidRootPart", true)
  77.  
  78. local sqrt = math.sqrt
  79. local pow = math.pow
  80.  
  81. local VirtualUser = cloneref(game:GetService("VirtualUser"))
  82. local HttpService = cloneref(game:GetService("HttpService"))
  83. local UserInputService = cloneref(game:GetService("UserInputService"))
  84.  
  85. local ReplicatedStorage = cloneref(game:GetService("ReplicatedStorage"))
  86. local ClientNetwork = ReplicatedStorage.Network
  87.  
  88. local Workspace = cloneref(game:GetService("Workspace"))
  89. local Debris = Workspace['__DEBRIS']
  90. local Things = Workspace["__THINGS"]
  91. local Instances = Things.Instances
  92. local instanceContainer = Things["__INSTANCE_CONTAINER"]
  93. local Lootbags = Things.Lootbags
  94. local Breakables = Things.Breakables
  95.  
  96. local Map
  97. if Workspace:FindFirstChild(mapName) then
  98. Map = Workspace:FindFirstChild(mapName)
  99. else
  100. output(mapName.."not found","warn")
  101. task.spawn(function()
  102. repeat
  103. task.wait()
  104. until Workspace:FindFirstChild(mapName)
  105. Map = Workspace:FindFirstChild(mapName)
  106. end)
  107. end
  108.  
  109. -- Configuration File
  110.  
  111. getgenv().config = getgenv().config
  112. local isFirstTime = false
  113. local configTemplate = {
  114. farmSettings = {
  115. breakObjects = false,
  116. singleTarget = false,
  117. breakRadius = 70,
  118. waitTime = 0.2,
  119. buyZones = false,
  120. collectLootbags = false,
  121. collectOrbs = false
  122. },
  123. eggSettings = {
  124. openEggs = false,
  125. selectedEgg = "",
  126. openAmount = 1
  127. },
  128. minigameSettings = {
  129. farmFishing = false
  130. },
  131. rewardSettings = {
  132. collectTimeRewards = false,
  133. collectSpinnerTicket = false,
  134. teleportAndStay = false
  135. },
  136. miscSettings = {
  137. antiAFK = false,
  138. stairwayToHeaven = false
  139. }
  140. }
  141.  
  142. if not isfolder("griffins configs") then
  143. isFirstTime = true
  144. makefolder("griffins configs")
  145. end
  146. if not isfile("griffins configs/8737899170.config") then
  147. isFirstTime = true
  148. writefile("griffins configs/8737899170.config", "")
  149. end
  150.  
  151. if isFirstTime then
  152. local encodedConfig = HttpService:JSONEncode(configTemplate)
  153. writefile("griffins configs/8737899170.config", encodedConfig)
  154. end
  155.  
  156. local function loadConfig()
  157. local decodedConfig = HttpService:JSONDecode(readfile("griffins configs/8737899170.config"))
  158. getgenv().config = decodedConfig
  159. end
  160. local function updateConfig()
  161. local encodedConfig = HttpService:JSONEncode(getgenv().config)
  162. writefile("griffins configs/8737899170.config", encodedConfig)
  163. end
  164.  
  165. loadConfig()
  166.  
  167. -- Tables
  168.  
  169. getgenv().coinQueue = {} -- needs to be global to clear it on reexecute
  170. local PS99Info = loadstring(game:HttpGet("https://raw.githubusercontent.com/idonthaveoneatm/lua/normal/games/PetSimulator99/informationTable.lua"))()
  171. PS99Info = PS99Info[mapName]
  172.  
  173. local worlds = PS99Info.Worlds
  174. local function getWorld(name: string)
  175. for index,wInfo in ipairs(worlds) do
  176. if wInfo.Name == name then
  177. return worlds[index]
  178. end
  179. end
  180. end
  181. local function getWorldNames()
  182. local returnTable = {}
  183. for _,wInfo in ipairs(worlds) do
  184. table.insert(returnTable, wInfo.Name)
  185. end
  186. return returnTable
  187. end
  188.  
  189. local vendingMachines = PS99Info.VendingMachines
  190. local function getVendingMachine(name: string)
  191. for index,vmInfo in ipairs(vendingMachines) do
  192. if vmInfo.Name == name then
  193. return vendingMachines[index]
  194. end
  195. end
  196. end
  197. local function getVendingMachineNames()
  198. local returnTable = {}
  199. for _,vmInfo in ipairs(vendingMachines) do
  200. table.insert(returnTable, vmInfo.Name)
  201. end
  202. return returnTable
  203. end
  204.  
  205. local rewards = PS99Info.Rewards
  206. local function getReward(name: string)
  207. for index,rInfo in ipairs(rewards) do
  208. if rInfo.Name == name then
  209. return rewards[index]
  210. end
  211. end
  212. end
  213. local function getRewardNames()
  214. local returnTable = {}
  215. for _,rInfo in ipairs(rewards) do
  216. table.insert(returnTable, rInfo.Name)
  217. end
  218. return returnTable
  219. end
  220.  
  221. local otherMachines = PS99Info.OtherMachines
  222. local function getOtherMachine(name: string)
  223. for index,omInfo in ipairs(otherMachines) do
  224. if omInfo.Name == name then
  225. return otherMachines[index]
  226. end
  227. end
  228. end
  229. local function getOtherMachineNames()
  230. local returnTable = {}
  231. for _,omInfo in ipairs(otherMachines) do
  232. table.insert(returnTable, omInfo.Name)
  233. end
  234. return returnTable
  235. end
  236.  
  237. local minigames = PS99Info.Minigames
  238. local eggs = PS99Info.Eggs
  239. local miscInfo = PS99Info.MiscInfo
  240.  
  241. -- Functions
  242.  
  243. local function calcDistance(obj1, obj2)
  244. local PosX1, PosZ1 = obj1.CFrame.X, obj1.CFrame.Z
  245. local PosX2, PosZ2 = obj2.CFrame.X, obj2.CFrame.Z
  246.  
  247. return sqrt(pow(PosX1 - PosX2, 2) + pow(PosZ1 - PosZ2, 2))
  248. end
  249. local function clickPosition(x,y)
  250. VirtualUser:Button1Down(Vector2.new(x,y))
  251. VirtualUser:Button1Up(Vector2.new(x,y))
  252. end
  253. local function goToPart(cframe)
  254. HumanoidRootPart.CFrame = cframe
  255. end
  256. local function waitFor(path, object, bool)
  257. bool = bool or false
  258. repeat
  259. task.wait()
  260. until path:FindFirstChild(object, bool)
  261. return path:FindFirstChild(object, bool)
  262. end
  263. local function checkActive(name)
  264. if not instanceContainer.Active:FindFirstChild(name) then
  265. goToPart(Instances[name]:FindFirstChild("Enter", true).CFrame)
  266. end
  267. end
  268. local function completeObby(obbyInfo)
  269. if typeof(obbyInfo) ~= "table" then
  270. return output("Not a table", "error")
  271. end
  272. if typeof(obbyInfo.StartLine) ~= "CFrame" then
  273. if obbyInfo.StartLine:IsA("Model") then
  274. obbyInfo.StartLine = obbyInfo.StartLine:FindFirstChild("Part").CFrame
  275. else
  276. obbyInfo.StartLine = obbyInfo.StartLine.CFrame
  277. end
  278. end
  279. if typeof(obbyInfo.EndPad) ~= "CFrame" then
  280. obbyInfo.EndPad = obbyInfo.EndPad.CFrame
  281. end
  282.  
  283. goToPart(obbyInfo.StartLine + Vector3.new(0,3,0))
  284. task.wait(0.5)
  285.  
  286. warn("Removed a require for Common.WinTimer. May break functionality")
  287.  
  288. goToPart(obbyInfo.EndPad + Vector3.new(0,3,0))
  289. end
  290. local function Fire(name, args)
  291. if ClientNetwork:FindFirstChild(name) then
  292. ClientNetwork[name]:FireServer(unpack(args))
  293. else
  294. warn("theres no ClientNetwork."..name)
  295. end
  296. end
  297. local function Invoke(name, args)
  298. if ClientNetwork:FindFirstChild(name) then
  299. ClientNetwork[name]:InvokeServer(unpack(args))
  300. else
  301. warn("theres no ClientNetwork."..name)
  302. end
  303. end
  304.  
  305. -- Library/Main script
  306.  
  307. local quake = loadstring(game:HttpGet("https://raw.githubusercontent.com/idonthaveoneatm/Libraries/normal/quake/src"))()
  308. local main = quake:Window({
  309. Title = "Pet Simulator 99",
  310. isMobile = UserInputService.TouchEnabled and not UserInputService.MouseEnabled
  311. })
  312.  
  313. local farmingTab = main:Tab({
  314. Name = "Farming",
  315. tabColor = Color3.fromHex("#71d1f5"),
  316. Image = "rbxassetid://10709769841"
  317. })
  318. local teleportsTab = main:Tab({
  319. Name = "Teleports",
  320. tabColor = Color3.fromHex("#9bf038"),
  321. Image = "rbxassetid://15555209580"
  322. })
  323. local minigamesTab = main:Tab({
  324. Name = "Minigames",
  325. tabColor = Color3.fromHex("#d19b4a"),
  326. Image = "rbxassetid://10723376114"
  327. })
  328. local rewardsTab = main:Tab({
  329. Name = "Rewards",
  330. tabColor = Color3.fromHex("#da0a48"),
  331. Image = "rbxassetid://10723396402"
  332. })
  333. local miscTab = main:Tab({
  334. Name = "Miscellaneous",
  335. tabColor = Color3.fromHex("#34d793"),
  336. Image = "rbxassetid://10709819149"
  337. })
  338. local creditsTab = main:Tab({
  339. Name = "Credits",
  340. Image = "rbxassetid://10747373176"
  341. })
  342.  
  343. -- Farming
  344.  
  345. farmingTab:Toggle({
  346. Name = "Farm Coins",
  347. Default = config.farmSettings.breakObjects,
  348. Callback = function(value)
  349. config.farmSettings.breakObjects = value
  350. updateConfig()
  351.  
  352. local doingQueue = false
  353.  
  354. while config.farmSettings.breakObjects and task.wait() do
  355. for _, v in ipairs(Breakables:GetChildren()) do
  356.  
  357. if v:FindFirstChild("Hitbox", true) then
  358. local coinPart = v:FindFirstChild("Hitbox", true)
  359. local coinName = v.Name
  360.  
  361. if calcDistance(coinPart, HumanoidRootPart) <= config.farmSettings.breakRadius then
  362. if config.farmSettings.singleTarget then
  363.  
  364. repeat
  365. task.wait(config.farmSettings.waitTime)
  366. Fire("Breakables_PlayerDealDamage", {coinName})
  367. until not Breakables:FindFirstChild(coinName) or calcDistance(coinPart, HumanoidRootPart) > config.farmSettings.breakRadius or not config.farmSettings.breakObjects or not config.farmSettings.singleTarget
  368.  
  369. else
  370.  
  371. if not table.find(coinQueue, v.Name) then
  372. table.insert(coinQueue, v.Name)
  373. task.spawn(function()
  374. repeat
  375. task.wait()
  376. until not Breakables:FindFirstChild(coinName) or calcDistance(coinPart, HumanoidRootPart) > config.farmSettings.breakRadius or config.farmSettings.singleTarget or not config.farmSettings.breakObjects
  377. table.remove(coinQueue, table.find(coinQueue, coinName))
  378. end)
  379. end
  380. task.spawn(function()
  381. if not doingQueue then
  382. doingQueue = true
  383. for _,currentCoin in ipairs(coinQueue) do
  384. Fire("Breakables_PlayerDealDamage", {currentCoin})
  385. task.wait(config.farmSettings.waitTime)
  386. end
  387. doingQueue = false
  388. end
  389. end)
  390.  
  391. end
  392. end
  393. end
  394. end
  395. end
  396. table.clear(coinQueue)
  397. end
  398. })
  399. farmingTab:Toggle({
  400. Name = "Single Target",
  401. Default = config.farmSettings.singleTarget,
  402. Callback = function(value)
  403. config.farmSettings.singleTarget = value
  404. updateConfig()
  405. end
  406. })
  407. local radiusSetter
  408. radiusSetter = farmingTab:TextBox({
  409. Name = "Radius (Recommended: 70)",
  410. Default = config.farmSettings.breakRadius,
  411. Callback = function(value)
  412. if tonumber(value) then
  413. config.farmSettings.breakRadius = tonumber(value)
  414. elseif value ~= "" and not tonumber(value) then
  415. config.farmSettings.breakRadius = 40
  416. radiusSetter:SetInput("40")
  417. main:Notify({
  418. Title = "Radius Error",
  419. Duration = 20,
  420. Body = "You need the RADIUS to be a number. It is now 40"
  421. })
  422. end
  423. updateConfig()
  424. end
  425. })
  426. local waitSetter
  427. waitSetter = farmingTab:TextBox({
  428. Name = "Wait Time (Recommended: 0.2)",
  429. Default = config.farmSettings.waitTime,
  430. Callback = function(value)
  431. if tonumber(value) then
  432. config.farmSettings.waitTime = tonumber(value)
  433. elseif value ~= "" and not tonumber(value) then
  434. waitSetter:SetInput("0.2")
  435. main:Notify({
  436. Title = "Wait Time Error",
  437. Duration = 20,
  438. Body = "You need the WAIT TIME to be a number. It is now 0.2"
  439. })
  440. end
  441. updateConfig()
  442. end
  443. })
  444. farmingTab:Toggle({
  445. Name = "Buy Next Zone",
  446. Default = config.farmSettings.buyZone,
  447. Callback = function(value)
  448. config.farmSettings.buyZone = value
  449. updateConfig()
  450.  
  451. for _,worldName in ipairs(getWorldNames()) do
  452. if not config.farmSettings.buyZone then break end
  453. task.spawn(function()
  454. while config.farmSettings.buyZone and task.wait() do
  455. local name = string.split(worldName, " | ")[2]
  456. Invoke("Zones_RequestPurchase", {name})
  457. end
  458. end)
  459. end
  460. end
  461. })
  462.  
  463. farmingTab:Section("Collection")
  464. local orbToggle = farmingTab:Toggle({
  465. Name = "Collect Orbs",
  466. Default = config.farmSettings.collectOrbs,
  467. Callback = function(value)
  468. end
  469. })
  470. orbToggle:Lock("Solara Version")
  471. local collectLootbags
  472. collectLootbags = farmingTab:Toggle({
  473. Name = "Collect Lootbags",
  474. Default = config.farmSettings.collectLootbags,
  475. Callback = function(value)
  476. config.farmSettings.collectLootbags = value
  477. updateConfig()
  478.  
  479. while config.farmSettings.collectLootbags and task.wait() do
  480. for _, lootbag in ipairs(Lootbags:GetDescendants()) do
  481. if not config.farmSettings.collectLootbags then break end
  482. if lootbag:IsA("MeshPart") then
  483. lootbag.CFrame = HumanoidRootPart.CFrame
  484. end
  485. end
  486. end
  487. end
  488. })
  489.  
  490. farmingTab:Section("Egg Farming")
  491. farmingTab:Label("You must be near eggs to hatch them")
  492. farmingTab:Dropdown({
  493. Name = "Egg to farm",
  494. Items = eggs,
  495. Multiselect = false,
  496. Default = config.eggSettings.selectedEgg,
  497. Callback = function(eggPicked)
  498. config.eggSettings.selectedEgg = eggPicked
  499. updateConfig()
  500. end
  501. })
  502. farmingTab:Slider({
  503. Name = "Amount of eggs",
  504. Max = 99,
  505. Min = 1,
  506. Default = config.eggSettings.openAmount,
  507. Callback = function(amountSelected)
  508. config.eggSettings.openAmount = amountSelected
  509. updateConfig()
  510. end
  511. })
  512. farmingTab:Toggle({
  513. Name = "Farm selected egg",
  514. Default = config.eggSettings.openEggs,
  515. Callback = function(value)
  516. config.eggSettings.openEggs = value
  517. updateConfig()
  518.  
  519. while config.eggSettings.openEggs and task.wait() do
  520. local splitName = string.split(config.eggSettings.selectedEgg, " | ")
  521. Invoke("Eggs_RequestPurchase",{splitName[2], config.eggSettings.openAmount})
  522. task.wait(0.4)
  523. repeat
  524. task.wait()
  525. clickPosition(math.huge,math.huge)
  526. until not Workspace.Camera:FindFirstChild("Eggs") or not config.eggSettings.openEggs
  527. task.wait(0.75)
  528. end
  529. end
  530. })
  531.  
  532. -- Teleports
  533.  
  534. local selectedWorld
  535. local goToZone
  536. teleportsTab:Dropdown({
  537. Name = "Zones",
  538. Items = getWorldNames(),
  539. Multiselect = false,
  540. Callback = function(chosenWorld)
  541. selectedWorld = getWorld(chosenWorld)
  542. goToZone:SetText("Go to "..chosenWorld)
  543. end
  544. })
  545. goToZone = teleportsTab:Button({
  546. Name = "Go to none",
  547. Callback = function()
  548. goToPart(selectedWorld.TeleportPart + Vector3.new(0,3,0))
  549. end
  550. })
  551.  
  552. teleportsTab:Section("Vending Machines")
  553. local selectedVM
  554. local goToVendingMachine
  555. teleportsTab:Dropdown({
  556. Name = "Vending Machines",
  557. Items = getVendingMachineNames(),
  558. Multiselect = false,
  559. Callback = function(chosenVM)
  560. selectedVM = getVendingMachine(chosenVM)
  561. goToVendingMachine:SetText("Go to "..chosenVM)
  562. end
  563. })
  564. goToVendingMachine = teleportsTab:Button({
  565. Name = "Go to none",
  566. Callback = function()
  567. local vmWorld = getWorld(selectedVM.Location)
  568.  
  569. goToPart(vmWorld.TeleportPart + Vector3.new(0,50,0))
  570. waitFor(Map[vmWorld.Name]["PARTS_LOD"], "GROUND")
  571. local world = Map[vmWorld.Name]
  572. local vendingPad = waitFor(world.INTERACT.Machines, selectedVM.Name).Pad.CFrame
  573. goToPart(vendingPad)
  574. end
  575. })
  576.  
  577. teleportsTab:Section("Other Machines")
  578. local selectedOM
  579. local goToOtherMachine
  580. teleportsTab:Dropdown({
  581. Name = "Other Machines",
  582. Items = getOtherMachineNames(),
  583. Multiselect = false,
  584. Callback = function(chosenOM)
  585. selectedOM = getOtherMachine(chosenOM)
  586. goToOtherMachine:SetText("Go to "..chosenOM)
  587. end
  588. })
  589. goToOtherMachine = teleportsTab:Button({
  590. Name = "Go to none",
  591. Callback = function()
  592. local omWorld = getWorld(selectedOM.Location)
  593.  
  594. goToPart(omWorld.TeleportPart + Vector3.new(0,50,0))
  595. waitFor(Map[omWorld.Name]["PARTS_LOD"], "GROUND")
  596. local world = Map[omWorld.Name]
  597. local vendingPad = waitFor(world.INTERACT.Machines, selectedOM.Name).Pad.CFrame
  598. goToPart(vendingPad)
  599. end
  600. })
  601.  
  602. teleportsTab:Label("Miscellaneous")
  603. teleportsTab:Button({
  604. Name = "Remove Water",
  605. Callback = function()
  606. for _, water in ipairs(Map:GetDescendants()) do
  607. if water:IsA("Folder") and water.Name == "Water Bounds" then
  608. water:Destroy()
  609. end
  610. end
  611. end
  612. })
  613.  
  614. -- Minigames
  615.  
  616. local selectedMG
  617. local goToMinigame
  618. local completeMinigame
  619. minigamesTab:Dropdown({
  620. Name = "Select Minigame",
  621. Items = minigames,
  622. Multiselect = false,
  623. Callback = function(chosenMG)
  624. selectedMG = chosenMG
  625. goToMinigame:SetText("Go to "..chosenMG)
  626. completeMinigame:SetText("Complete "..chosenMG)
  627. end
  628. })
  629. goToMinigame = minigamesTab:Button({
  630. Name = "Go to none",
  631. Callback = function()
  632. goToPart(Things.Instances[selectedMG]:FindFirstChild("Enter", true).CFrame)
  633. end
  634. })
  635. minigamesTab:Section("Auto Complete")
  636. completeMinigame = minigamesTab:Button({
  637. Name = 'Complete none',
  638. Callback = function()
  639. checkActive(selectedMG)
  640. task.wait(1)
  641. local loadedMG = waitFor(instanceContainer.Active, selectedMG)
  642. task.wait(1)
  643. if selectedMG ~= "Minefield" and selectedMG ~= "Atlantis" and selectedMG ~= "Minecart" then
  644. local StartLine = waitFor(loadedMG, "StartLine", true)
  645. local Goal = waitFor(loadedMG, "Goal", true)
  646. completeObby({
  647. Name = selectedMG,
  648. StartLine = StartLine,
  649. EndPad = Goal.Pad
  650. })
  651. elseif selectedMG == "Minefield" then
  652.  
  653. warn("Removed a require for Common.WinTimer and Common.RespawnTimer. May break functionality")
  654.  
  655. local mines = waitFor(loadedMG, "Mines")
  656. local finish = waitFor(loadedMG, "Finish")
  657. local nextX,nextZ = 0, 0
  658. for _,mine in ipairs(mines:GetChildren()) do
  659. if nextX == 0 then
  660. local oldPos = mine.Pad.CFrame
  661. mine.Pad.CanCollide = false
  662. nextX = mine.Pad.Position.X
  663. nextZ = mine.Pad.Position.Z
  664. mine.Pad.CFrame = HumanoidRootPart.CFrame
  665. task.wait(0.2)
  666. mine.Pad.CFrame = oldPos
  667. mine.Pad.CanCollide = true
  668. if tostring(mine.Pad.BrickColor) == "Really red" then
  669. nextZ = nextZ + 10
  670. task.wait(2)
  671. else
  672. nextX = nextX + 10
  673. end
  674. else
  675. if mine.Pad.Position.X == nextX and mine.Pad.Position.Z == nextZ then
  676. local oldPos = mine.Pad.CFrame
  677. mine.Pad.CanCollide = false
  678. mine.Pad.CFrame = HumanoidRootPart.CFrame
  679. task.wait(0.2)
  680. mine.Pad.CFrame = oldPos
  681. mine.Pad.CanCollide = true
  682. if tostring(mine.Pad.BrickColor) == "Really red" then
  683. nextZ = nextZ + 10
  684. task.wait(2)
  685. else
  686. nextX = nextX + 10
  687. end
  688. end
  689. end
  690. end
  691. goToPart(finish.CFrame + Vector3.new(0,3,0))
  692. elseif selectedMG == "Atlantis" then
  693. checkActive("Atlantis")
  694. task.wait(1)
  695. local atlantis = waitFor(instanceContainer.Active, "Atlantis")
  696. local rings = waitFor(atlantis, "Rings")
  697. for i=1,31 do
  698. local ring = waitFor(rings, tostring(i))
  699. task.wait(0.4)
  700. HumanoidRootPart.CFrame = ring.Collision.CFrame
  701. end
  702. elseif selectedMG == "Minecart" then
  703. waitFor(loadedMG.Interactable, "StartLine")
  704. waitFor(loadedMG.Interactable, "Goal")
  705. completeObby({
  706. Name = selectedMG,
  707. StartLine = CFrame.new(0,0,0) + Vector3.new(-1380.3746337890625, -102.0365982055664, -4659.6044921875),
  708. EndPad = loadedMG.Interactable.Goal.Pad
  709. })
  710. end
  711. end
  712. })
  713. minigamesTab:Toggle({
  714. Name = "Farm Fishing",
  715. Default = config.minigameSettings.farmFishing,
  716. Callback = function(value)
  717. config.minigameSettings.farmFishing = value
  718. updateConfig()
  719.  
  720. checkActive("Fishing")
  721. task.wait(0.2)
  722. local fishing = waitFor(instanceContainer.Active, "Fishing")
  723. local Layer1 = waitFor(fishing.Water, "Layer1")
  724. local L1Position = Layer1.Position
  725. local function fishingRemote(type, args)
  726. if type == "Invoke" then
  727. return Invoke("Instancing_InvokeCustomFromClient", {"Fishing", unpack(args)})
  728. elseif type == "Fire" then
  729. return Fire("Instancing_FireCustomFromClient", {"Fishing", unpack(args)})
  730. end
  731. end
  732. local function isBubbling()
  733. local bubbling = false
  734. for _,host in ipairs(Debris:GetChildren()) do
  735. if host.Name == "host" and host:FindFirstChild("Attachment") and (host.Attachment:FindFirstChild("Bubbles") or host.Attachment:FindFirstChild("Rare Bubbles")) then
  736. local distance = (L1Position.X - host.Position.X)
  737. if distance <= 2 then
  738. bubbling = true
  739. end
  740. end
  741. end
  742. return bubbling
  743. end
  744. while config.minigameSettings.farmFishing and task.wait() do
  745. fishingRemote("Fire",{"RequestCast", Vector3.new(L1Position.X,L1Position.Y,L1Position.Z)})
  746. repeat task.wait() until isBubbling() or not config.minigameSettings.farmFishing
  747. fishingRemote("Fire", {"RequestReel"})
  748. repeat
  749. task.wait()
  750. fishingRemote("Invoke", {"Clicked"})
  751. until (not isBubbling()) or not config.minigameSettings.farmFishing
  752. end
  753. goToPart(fishing.Interactable:FindFirstChild("Pad", true).CFrame + Vector3.new(0,3,0))
  754. end
  755. })
  756. minigamesTab:Toggle({
  757. Name = "Farm Digsite",
  758. Default = false,
  759. Callback = function(value)
  760. config.minigameSettings.farmDigsite = value
  761. updateConfig()
  762.  
  763. checkActive("Digsite")
  764. task.wait(0.2)
  765. local digsite = waitFor(instanceContainer.Active, "Digsite")
  766. local function digsiteRemote(type, args)
  767. if type == "Invoke" then
  768. return Invoke("Instancing_InvokeCustomFromClient", {"Digsite", unpack(args)})
  769. elseif type == "Fire" then
  770. return Fire("Instancing_FireCustomFromClient", {"Digsite", unpack(args)})
  771. end
  772. end
  773. local ActiveChests = digsite.Important.ActiveChests
  774. local ActiveBlocks = digsite.Important.ActiveBlocks
  775. local starterPos = CFrame.new(-75.44137573242188, 60.91250991821289, -2530.437744140625)
  776. local endPos = CFrame.new(-65.44137573242188, 60.91250991821289, -2520.437744140625)
  777.  
  778. local function getChests(oldPosition)
  779. for _,chest in ipairs(ActiveChests:GetChildren()) do
  780. print(chest.Name)
  781. if chest.Name == "Animated" then
  782. print("attempting ", chest.Name)
  783. goToPart(chest.Bottom.CFrame)
  784. task.wait(0.2)
  785. digsiteRemote("Fire",{"DigChest",chest:GetAttribute("Coord")})
  786. repeat task.wait() until not ActiveChests:FindFirstChild(chest)
  787. task.wait(1)
  788. end
  789. end
  790. goToPart(oldPosition)
  791. end
  792. local function checkForChests()
  793. local isChest = false
  794. for _, chest in ipairs(ActiveChests:GetChildren()) do
  795. if chest.Name == "Animated" then
  796. isChest = true
  797. end
  798. end
  799. return isChest
  800. end
  801. local function getBlockDistance(obj)
  802. return (HumanoidRootPart.Position - obj.Position).magnitude
  803. end
  804. if config.minigameSettings.farmDigsite then
  805. goToPart(starterPos)
  806. task.wait(0.2)
  807. getChests(starterPos)
  808. end
  809. while config.minigameSettings.farmDigsite and task.wait() do
  810. for _,block in ipairs(ActiveBlocks:GetChildren()) do
  811. if checkForChests() then
  812. getChests(HumanoidRootPart.CFrame)
  813. break
  814. end
  815. if block.Name == "Part" then
  816. local distance = getBlockDistance(block)
  817.  
  818. if distance < 8 then
  819. print(distance)
  820. repeat
  821. digsiteRemote("Fire", {"DigBlock", block:GetAttribute("Coord")})
  822. task.wait()
  823. until not ActiveBlocks:FindFirstChild(block) or (getBlockDistance(block) > 8)
  824. end
  825. end
  826. end
  827. end
  828.  
  829. goToPart(endPos)
  830. end
  831. })
  832. -- Rewards
  833.  
  834. rewardsTab:Toggle({
  835. Name = 'Collect Time Rewards',
  836. Default = config.rewardSettings.collectTimeRewards,
  837. Callback = function(value)
  838. config.rewardSettings.collectTimeRewards = value
  839. updateConfig()
  840. if not config.farmSettings.collectLootbags then
  841. collectLootbags:SetValue(config.rewardSettings.collectTimeRewards)
  842. end
  843.  
  844. while config.rewardSettings.collectTimeRewards and task.wait() do
  845. for i=1,12 do
  846. Invoke("Redeem Free Gift", {i})
  847. end
  848. end
  849. end
  850. })
  851. rewardsTab:Toggle({
  852. Name = "Collect Spinner Ticket",
  853. Default = config.rewardSettings.collectSpinnerTicket,
  854. Callback = function(value)
  855. config.rewardSettings.collectSpinnerTicket = value
  856. updateConfig()
  857.  
  858. while config.rewardSettings.collectSpinnerTicket and task.wait() do
  859. Fire("Spinny Wheel: Request Ticket", {"StarterWheel"})
  860. end
  861. end
  862. })
  863. rewardsTab:Section("Daily Rewards")
  864. local selectedReward
  865. local getDailyReward
  866. rewardsTab:Dropdown({
  867. Name = "Reward Type",
  868. Items = getRewardNames(),
  869. Callback = function(chosenReward)
  870. selectedReward = getReward(chosenReward)
  871. getDailyReward:SetText("Get: "..chosenReward)
  872. end
  873. })
  874. rewardsTab:Toggle({
  875. Name = "Teleport and Stay",
  876. Default = config.rewardSettings.teleportAndStay,
  877. Callback = function(value)
  878. config.rewardSettings.teleportAndStay = value
  879. updateConfig()
  880. end
  881. })
  882. getDailyReward = rewardsTab:Button({
  883. Name = "Get: none",
  884. Callback = function()
  885. local oldPos = HumanoidRootPart.CFrame
  886. local rewardWorld = getWorld(selectedReward.Location)
  887.  
  888. goToPart(rewardWorld.TeleportPart + Vector3.new(0,50,0))
  889. waitFor(Map[rewardWorld.Name]["PARTS_LOD"], "GROUND")
  890. local world = Map[rewardWorld.Name]
  891. local rewardPad = waitFor(world.INTERACT.Machines, selectedReward.Name).Pad.CFrame
  892. goToPart(rewardPad + Vector3.new(0,3,0))
  893. if not config.rewardSettings.teleportAndStay then
  894. task.wait(0.2)
  895. goToPart(oldPos)
  896. end
  897. end
  898. })
  899. rewardsTab:Button({
  900. Name = "Go to Crystal Chest",
  901. Callback = function()
  902. local ccWorld = getWorld("3 | Castle")
  903.  
  904. goToPart(ccWorld.TeleportPart + Vector3.new(0,50,0))
  905. waitFor(Map[ccWorld.Name]["PARTS_LOD"], "GROUND")
  906. local world = Map[ccWorld.Name]
  907. local rewardPad = waitFor(world.INTERACT, "CrystalChest").Pad.CFrame
  908. goToPart(rewardPad + Vector3.new(0,3,0))
  909. end
  910. })
  911.  
  912. -- Miscellaneous
  913.  
  914. miscTab:Label("These are things that dont fit in a category")
  915. miscTab:Toggle({
  916. Name = "Anti AFK",
  917. Default = config.miscSettings.antiAFK,
  918. Callback = function(value)
  919. config.miscSettings.antiAFK = value
  920. updateConfig()
  921.  
  922. while config.miscSettings.antiAFK and task.wait() do
  923. LocalPlayer.Character.Humanoid:ChangeState(3)
  924. task.wait(math.random(120,180))
  925. end
  926. end
  927. })
  928. local shrineButton
  929. shrineButton = miscTab:Button({
  930. Name = "Collect Shrines (maybe)",
  931. Callback = function()
  932. for i=1, miscInfo.relicCount do
  933. shrineButton:SetText("Progress: "..tostring(i).."/"..tostring(miscInfo.relicCount))
  934. Invoke("Relic_Found", {i})
  935. end
  936. shrineButton:SetText("Collect Shrines (Maybe)")
  937. end
  938. })
  939. local completeStairs
  940. completeStairs = miscTab:Toggle({
  941. Name = "Try and complete stairway to heaven",
  942. Default = config.miscSettings.stairwayToHeaven,
  943. Callback = function(value)
  944. config.miscSettings.stairwayToHeaven = value
  945. updateConfig()
  946.  
  947. if config.miscSettings.stairwayToHeaven and not instanceContainer.Active:FindFirstChild("StairwayToHeaven") then
  948. goToPart(CFrame.new(0,-100,0))
  949. end
  950. repeat task.wait() until instanceContainer.Active:FindFirstChild("StairwayToHeaven")
  951. local stairway = instanceContainer.Active.StairwayToHeaven
  952. local highestY = 0
  953. local oldHighest = highestY
  954. local highestCFrame
  955.  
  956. while config.miscSettings.stairwayToHeaven and task.wait() do
  957. if stairway:FindFirstChild("Goal", true) then
  958. config.miscSettings.stairwayToHeaven = false
  959. completeStairs:SetValue(false)
  960. local goal = stairway:FindFirstChild("Goal", true)
  961. task.wait(0.3)
  962. goToPart(goal.Shrine.Pad.CFrame + Vector3.new(0,3,0))
  963. end
  964. task.spawn(function()
  965. for _,part in ipairs(stairway:GetDescendants()) do
  966. if part.Name == "Goal" then
  967. config.miscSettings.stairwayToHeaven = false
  968. completeStairs:SetValue(false)
  969. local goal = stairway:FindFirstChild("Goal", true)
  970. task.wait(0.3)
  971. goToPart(goal.Shrine.Pad.CFrame + Vector3.new(0,3,0))
  972. end
  973. end
  974. end)
  975. for _,section in ipairs(stairway.Stairs:GetChildren()) do
  976. if not config.miscSettings.stairwayToHeaven then break end
  977.  
  978. if section.Name == "Section" then
  979. for _,part in ipairs(section:GetChildren()) do
  980. if not config.miscSettings.stairwayToHeaven then break end
  981.  
  982. if part.Name == "Part" and part:IsA("Part") then
  983. if part.Position.Y > highestY then
  984. highestY = part.Position.Y
  985. highestCFrame = part.CFrame
  986. end
  987. end
  988. end
  989. end
  990. end
  991. if oldHighest ~= highestY then
  992. oldHighest = highestY
  993. pcall(function()
  994. goToPart(highestCFrame + Vector3.new(0,3,0))
  995. end)
  996. task.wait(0.2)
  997. end
  998. end
  999. end
  1000. })
  1001. miscTab:Label("^ This probably doesn't even work ^")
  1002.  
  1003. creditsTab:Label("UI: griffindoescooking")
  1004. creditsTab:Label("Script: griffindoescooking, project L")
  1005. creditsTab:Button({
  1006. Name = "Discord",
  1007. Callback = function()
  1008. setclipboard("discord.gg/vF4qcGSxbn")
  1009. end
  1010. })
  1011. creditsTab:Section("Discord: ")
  1012. creditsTab:Button({
  1013. Name = "Discord",
  1014. Callback = function()
  1015. setclipboard("discord.gg/vF4qcGSxbn")
  1016. end
  1017. })
Advertisement
Add Comment
Please, Sign In to add comment