Yingyang005

ALS

Dec 18th, 2024 (edited)
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.74 KB | None | 0 0
  1. repeat task.wait() until game:IsLoaded() and game:GetService("Players").LocalPlayer:FindFirstChild("PlayerGui")
  2.  
  3. --// Variables
  4. local Player = game:GetService("Players").LocalPlayer
  5. local PlayerGui = Player.PlayerGui
  6. local Character = Player.Character or Player.CharacterAdded:Wait()
  7. local RepStorage = game:GetService("ReplicatedStorage")
  8. local HttpService = game:GetService("HttpService")
  9.  
  10. --// Tables
  11. local MapTeleports = {
  12. "Desert Village", "Water Park", "Hollow Dimension", "Planet Nemak", "Star Mansion",
  13. "Super Hero City", "Hero Association", "Snowy Domain", "Infested City",
  14. "Lost Castle", "Ruined City"
  15. }
  16.  
  17. local Settings = {}
  18. local Stats = {}
  19. local RewardsStats = {}
  20.  
  21. local function loadFile(fileName, defaultContent)
  22. local success, result = pcall(function()
  23. return HttpService:JSONDecode(readfile(fileName))
  24. end)
  25. if success then
  26. return result
  27. else
  28. writefile(fileName, HttpService:JSONEncode(defaultContent))
  29. return defaultContent
  30. end
  31. end
  32.  
  33. Settings = loadFile("Config-AnimeLastStand.json", {
  34. ["Selected Map"] = "",
  35. ["Selected Act"] = "",
  36. ["Selected Difficulty"] = "",
  37. ["Friends Only"] = false,
  38. ["Auto Join Story"] = false,
  39. ["Solo Queue"] = false,
  40. ["Auto Join Castle"] = false,
  41. ["UnitToPlace"] = "",
  42. ["Webhook"] = ""
  43. })
  44.  
  45. RewardsStats = loadFile("Rewards-AnimeLastStand.json", {
  46. ["Rerolls"] = 0
  47. })
  48.  
  49. --// Save Functions
  50. local function SaveSettings()
  51. writefile("Config-AnimeLastStand.json", HttpService:JSONEncode(Settings))
  52. end
  53.  
  54. local function SendWebhook(embed, msg)
  55. if Settings["Webhook"] == "" then return end
  56.  
  57. local data = embed and {
  58. ["embeds"] = {
  59. {
  60. ["title"] = "Anime Last Stand",
  61. ["description"] = msg,
  62. ["type"] = "rich",
  63. ["color"] = tonumber(0x7269ff),
  64. }
  65. }
  66. } or {
  67. ["content"] = msg .. "\n-# Account: **" .. Player.Name .. "**"
  68. }
  69.  
  70. local headers = { ["Content-Type"] = "application/json" }
  71. local request = http_request or request or HttpPost or http.request
  72. if request then
  73. request({ Url = Settings["Webhook"], Body = HttpService:JSONEncode(data), Method = "POST", Headers = headers })
  74. else
  75. warn("Http request function not found!")
  76. end
  77. end
  78.  
  79. --// Functions
  80. local function JoinStory(TP)
  81. Character:PivotTo(TP.Door.CFrame)
  82. repeat task.wait() until PlayerGui.Story.Enabled
  83. RepStorage.Remotes.Story.Select:InvokeServer(
  84. Settings["Selected Map"], Settings["Selected Act"], Settings["Selected Difficulty"], Settings["Friends Only"]
  85. )
  86. task.wait(1)
  87. RepStorage.Remotes.Teleporter.Interact:FireServer("Skip")
  88. SendWebhook(false, "Joined Story\n-# Map: **" .. Settings["Selected Map"] .. "**\n-# Act: **" .. Settings["Selected Act"] .. "**\n-# Difficulty: **" .. Settings["Selected Difficulty"] .. "**")
  89. end
  90.  
  91. local function AutoStory()
  92. if not Settings["Auto Join Story"] then return end
  93. for _, Teleporter in ipairs(workspace.TeleporterFolder.Story:GetChildren()) do
  94. if Teleporter:FindFirstChild("Door") then
  95. local playerCount = Teleporter.Door.UI.PlayerCount.Text
  96. if (Settings["Solo Queue"] and playerCount == "0/4 Players") or
  97. (not Settings["Solo Queue"] and playerCount ~= "0/4 Players" and playerCount ~= "4/4 Players") then
  98. JoinStory(Teleporter)
  99. break
  100. end
  101. end
  102. end
  103. end
  104.  
  105. local function AutoInfinityCastle()
  106. if not Settings["Auto Join Castle"] then return end
  107. Character:PivotTo(workspace.Lobby.Npcs.Asta.HumanoidRootPart.CFrame * CFrame.new(1, 0, 0))
  108. task.wait(1)
  109. SendWebhook(false, "Joined **Infinite Castle**")
  110. repeat
  111. RepStorage.Remotes.InfiniteCastleManager:FireServer("Play", 0)
  112. task.wait(1)
  113. until game.PlaceId ~= 12886143095
  114. end
  115.  
  116. --// UI Library
  117. local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/shlexware/Orion/main/source"))()
  118. local Window = OrionLib:MakeWindow({Name = "Anime Last Stand", HidePremium = false, SaveConfig = true, ConfigFolder = "ALS_Config"})
  119.  
  120. -- Tabs and Sections
  121. local Tab1 = Window:MakeTab({Name = "Story", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  122. local Tab2 = Window:MakeTab({Name = "Infinity Castle", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  123. local Tab3 = Window:MakeTab({Name = "Miscellaneous", Icon = "rbxassetid://4483345998", PremiumOnly = false})
  124.  
  125. local Storys = Tab1:AddSection({Name = "Story Settings"})
  126. local Castle = Tab2:AddSection({Name = "Infinity Castle Settings"})
  127. local Misc = Tab3:AddSection({Name = "Miscellaneous Features"})
  128.  
  129. -- Controls
  130. Storys:AddDropdown({
  131. Name = "Select Map",
  132. Default = "",
  133. Options = MapTeleports,
  134. Callback = function(Selected)
  135. Settings["Selected Map"] = Selected
  136. SaveSettings()
  137. end
  138. })
  139.  
  140. Storys:AddToggle({
  141. Name = "Auto Join Story",
  142. Default = false,
  143. Callback = function(State)
  144. Settings["Auto Join Story"] = State
  145. SaveSettings()
  146. AutoStory()
  147. end
  148. })
  149.  
  150. Castle:AddToggle({
  151. Name = "Auto Join Castle",
  152. Default = false,
  153. Callback = function(State)
  154. Settings["Auto Join Castle"] = State
  155. SaveSettings()
  156. AutoInfinityCastle()
  157. end
  158. })
  159.  
  160. Misc:AddTextbox({
  161. Name = "Webhook",
  162. Default = "",
  163. TextDisappear = true,
  164. Callback = function(Selected)
  165. Settings["Webhook"] = Selected
  166. SaveSettings()
  167. end
  168. })
  169.  
  170. Misc:AddBind({
  171. Name = "Toggle UI",
  172. Default = Enum.KeyCode.F,
  173. Hold = false,
  174. Callback = function()
  175. OrionLib:ToggleUI()
  176. end
  177. })
  178.  
  179. -- Initialize UI
  180. OrionLib:Init()
  181.  
Advertisement
Add Comment
Please, Sign In to add comment