Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat task.wait() until game:IsLoaded() and game:GetService("Players").LocalPlayer:FindFirstChild("PlayerGui")
- --// Variables
- local Player = game:GetService("Players").LocalPlayer
- local PlayerGui = Player.PlayerGui
- local Character = Player.Character or Player.CharacterAdded:Wait()
- local RepStorage = game:GetService("ReplicatedStorage")
- local HttpService = game:GetService("HttpService")
- --// Tables
- local MapTeleports = {
- "Desert Village", "Water Park", "Hollow Dimension", "Planet Nemak", "Star Mansion",
- "Super Hero City", "Hero Association", "Snowy Domain", "Infested City",
- "Lost Castle", "Ruined City"
- }
- local Settings = {}
- local Stats = {}
- local RewardsStats = {}
- local function loadFile(fileName, defaultContent)
- local success, result = pcall(function()
- return HttpService:JSONDecode(readfile(fileName))
- end)
- if success then
- return result
- else
- writefile(fileName, HttpService:JSONEncode(defaultContent))
- return defaultContent
- end
- end
- Settings = loadFile("Config-AnimeLastStand.json", {
- ["Selected Map"] = "",
- ["Selected Act"] = "",
- ["Selected Difficulty"] = "",
- ["Friends Only"] = false,
- ["Auto Join Story"] = false,
- ["Solo Queue"] = false,
- ["Auto Join Castle"] = false,
- ["UnitToPlace"] = "",
- ["Webhook"] = ""
- })
- RewardsStats = loadFile("Rewards-AnimeLastStand.json", {
- ["Rerolls"] = 0
- })
- --// Save Functions
- local function SaveSettings()
- writefile("Config-AnimeLastStand.json", HttpService:JSONEncode(Settings))
- end
- local function SendWebhook(embed, msg)
- if Settings["Webhook"] == "" then return end
- local data = embed and {
- ["embeds"] = {
- {
- ["title"] = "Anime Last Stand",
- ["description"] = msg,
- ["type"] = "rich",
- ["color"] = tonumber(0x7269ff),
- }
- }
- } or {
- ["content"] = msg .. "\n-# Account: **" .. Player.Name .. "**"
- }
- local headers = { ["Content-Type"] = "application/json" }
- local request = http_request or request or HttpPost or http.request
- if request then
- request({ Url = Settings["Webhook"], Body = HttpService:JSONEncode(data), Method = "POST", Headers = headers })
- else
- warn("Http request function not found!")
- end
- end
- --// Functions
- local function JoinStory(TP)
- Character:PivotTo(TP.Door.CFrame)
- repeat task.wait() until PlayerGui.Story.Enabled
- RepStorage.Remotes.Story.Select:InvokeServer(
- Settings["Selected Map"], Settings["Selected Act"], Settings["Selected Difficulty"], Settings["Friends Only"]
- )
- task.wait(1)
- RepStorage.Remotes.Teleporter.Interact:FireServer("Skip")
- SendWebhook(false, "Joined Story\n-# Map: **" .. Settings["Selected Map"] .. "**\n-# Act: **" .. Settings["Selected Act"] .. "**\n-# Difficulty: **" .. Settings["Selected Difficulty"] .. "**")
- end
- local function AutoStory()
- if not Settings["Auto Join Story"] then return end
- for _, Teleporter in ipairs(workspace.TeleporterFolder.Story:GetChildren()) do
- if Teleporter:FindFirstChild("Door") then
- local playerCount = Teleporter.Door.UI.PlayerCount.Text
- if (Settings["Solo Queue"] and playerCount == "0/4 Players") or
- (not Settings["Solo Queue"] and playerCount ~= "0/4 Players" and playerCount ~= "4/4 Players") then
- JoinStory(Teleporter)
- break
- end
- end
- end
- end
- local function AutoInfinityCastle()
- if not Settings["Auto Join Castle"] then return end
- Character:PivotTo(workspace.Lobby.Npcs.Asta.HumanoidRootPart.CFrame * CFrame.new(1, 0, 0))
- task.wait(1)
- SendWebhook(false, "Joined **Infinite Castle**")
- repeat
- RepStorage.Remotes.InfiniteCastleManager:FireServer("Play", 0)
- task.wait(1)
- until game.PlaceId ~= 12886143095
- end
- --// UI Library
- local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/shlexware/Orion/main/source"))()
- local Window = OrionLib:MakeWindow({Name = "Anime Last Stand", HidePremium = false, SaveConfig = true, ConfigFolder = "ALS_Config"})
- -- Tabs and Sections
- local Tab1 = Window:MakeTab({Name = "Story", Icon = "rbxassetid://4483345998", PremiumOnly = false})
- local Tab2 = Window:MakeTab({Name = "Infinity Castle", Icon = "rbxassetid://4483345998", PremiumOnly = false})
- local Tab3 = Window:MakeTab({Name = "Miscellaneous", Icon = "rbxassetid://4483345998", PremiumOnly = false})
- local Storys = Tab1:AddSection({Name = "Story Settings"})
- local Castle = Tab2:AddSection({Name = "Infinity Castle Settings"})
- local Misc = Tab3:AddSection({Name = "Miscellaneous Features"})
- -- Controls
- Storys:AddDropdown({
- Name = "Select Map",
- Default = "",
- Options = MapTeleports,
- Callback = function(Selected)
- Settings["Selected Map"] = Selected
- SaveSettings()
- end
- })
- Storys:AddToggle({
- Name = "Auto Join Story",
- Default = false,
- Callback = function(State)
- Settings["Auto Join Story"] = State
- SaveSettings()
- AutoStory()
- end
- })
- Castle:AddToggle({
- Name = "Auto Join Castle",
- Default = false,
- Callback = function(State)
- Settings["Auto Join Castle"] = State
- SaveSettings()
- AutoInfinityCastle()
- end
- })
- Misc:AddTextbox({
- Name = "Webhook",
- Default = "",
- TextDisappear = true,
- Callback = function(Selected)
- Settings["Webhook"] = Selected
- SaveSettings()
- end
- })
- Misc:AddBind({
- Name = "Toggle UI",
- Default = Enum.KeyCode.F,
- Hold = false,
- Callback = function()
- OrionLib:ToggleUI()
- end
- })
- -- Initialize UI
- OrionLib:Init()
Advertisement
Add Comment
Please, Sign In to add comment