Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --!strict
- local Configurations = {
- DestroyButtons = {
- Enabled = true;
- ["KillPlayer"] = true;
- ["SkipToEnd"] = false;
- ["ResetWinners"] = false; -- This button may be used as toggle for automatic phase completion.
- ["KillEveryone"] = false; -- If GetTool.AsButton is set to true, this button will be used by that functionality.
- -- When eliminating any of theses buttons with optional additional functionalities, be aware that that you will also take all the same functionalities that you opt to enable on them.
- };
- ["GetTools"] = {
- OnDeath = true;
- AsButton = true; -- This will replace the button "Kill Everyone"
- -- If you mark this button to be deleted, this functionality will not be placed as an button.
- };
- ["Replace reset winners button as toggle to phase automatic completion"] = true;
- ["Complete phases automatically"] = true; -- Automatic wins.
- ["Make skip button free"] = true;
- --> To disable any of theses, set their value to false;
- -- Functionality = false;
- -- Eg: GetAllTools = false;
- }
- local LocalPlayer = game.Players.LocalPlayer
- local PlayerCharacter, HumanoidRootPart
- local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
- local MainGUI = PlayerGui:WaitForChild("Main")
- local WinnersArea = game.Workspace:WaitForChild("WinnersArea");
- local LeaderStats = LocalPlayer:WaitForChild("leaderstats")
- local Values = LocalPlayer:WaitForChild("Values")
- local CoreGui
- local LeftFrame
- -- LIBS
- local Goto
- local GetAllTools
- local UI
- -- ENSURE LIBS WERE LOADED
- local function ensure(n: "Goto" | "GetAllTools" | "UI")
- if n == "Goto" and not Goto then
- Goto = loadstring(game:HttpGet("https://pastebin.com/raw/4fWebx7d"))()
- elseif n == "GetAllTools" and not GetAllTools then
- GetAllTools = loadstring(game:HttpGet("https://pastebin.com/raw/HrbnLei8"))()
- elseif n == "UI" and not UI then
- UI = loadstring(game:HttpGet("https://pastebin.com/raw/4eDufEtx"))()
- end
- end
- if Configurations.GetTools then
- warn("STARTING: GetAllTools")
- ensure("GetAllTools")
- local Settings = Configurations.GetTools
- local Delaying = false
- if Settings.OnDeath then
- LocalPlayer.CharacterAdded:Connect(function()
- task.wait(0.1)
- GetAllTools()
- end)
- end
- if Settings.AsButton then
- ensure("UI")
- local KillPlayerFrame = UI.getFromLeftFrame("Kill")
- local KillPlayerButton = KillPlayerFrame:WaitForChild("Button")
- KillPlayerFrame.Name = "Get Tools"
- KillPlayerButton.Text = "Get Tools"
- do
- local KillPrompt = KillPlayerButton:FindFirstChild("Prompt")
- if KillPrompt then
- KillPrompt:Destroy()
- end
- end
- KillPlayerButton.MouseButton1Down:Connect(function()
- if Delaying then
- return
- end
- Delaying = true
- GetAllTools()
- task.wait(1)
- Delaying = false;
- end)
- end
- warn("ENDED LOADING: GetAllTools")
- end
- local SkipButton
- if Configurations["Make skip button free"] and not Configurations.DestroyButtons.SkipToEnd then
- warn("STARTING: MakeSkipToEndFree")
- ensure("Goto")
- ensure("UI")
- local SkipFrame = UI.getFromLeftFrame("Skip")
- SkipButton = SkipFrame:WaitForChild("Button")
- local PreviousPosition
- local CurrentState
- local p = SkipButton:FindFirstChild("Prompt")
- if p then
- p:Destroy()
- end
- SkipButton.MouseButton1Down:Connect(function()
- if not CurrentState then
- SkipButton.Text = "Go back"
- PreviousPosition = Goto.End()
- CurrentState = true
- else
- CurrentState = false
- Goto.Position(PreviousPosition)
- SkipButton.Text = "Skip To End"
- end
- end)
- warn("ENDED LOADING: MakeSkipToEndFree")
- end
- local Wins
- local DidWin
- if Configurations["Complete phases automatically"] then
- warn("STARTED: CompletePhasesAutomatically")
- ensure("Goto")
- CoreGui = game:GetService("StarterGui")
- Wins = LeaderStats:WaitForChild("Wins")
- DidWin = Values:WaitForChild("DidWin")
- local Enabled = true;
- local function Complete(Won: boolean?)
- if not Enabled then
- return
- end
- if Won then
- CoreGui:SetCore("SendNotification", {
- Title = "Match completed;" ;
- Text = "The script applied its effectiveness and won it for you :)";
- Duration = 50;
- })
- else
- while DidWin.Value == false do
- Goto.End()
- task.wait(1)
- end
- end
- end
- if DidWin.Value == false then
- Complete(false)
- else
- CoreGui:SetCore("SendNotification", {
- Title = "You've won already.";
- Text = "The script has just started running, but you have already won this match.";
- Duration = 20;
- })
- end
- DidWin:GetPropertyChangedSignal("Value"):Connect(Complete)
- if not Configurations.DestroyButtons.ResetWinners and Configurations["Replace reset winners button as toggle to phase automatic completion"] then
- local Toggle = UI.getFromLeftFrame("Reset")
- local ToggleButton = Toggle.Button
- do
- local ResetPrompt = Toggle:FindFirstChild("Prompt")
- if ResetPrompt then
- ResetPrompt:Destroy()
- end
- end
- Toggle.Name = "Toggle_AutomaticPhaseCompletion"
- ToggleButton.Text = "Automatic Phase Completion"
- local Colors = {
- Enabled = Color3.fromRGB(111, 255, 101);
- Disabled = Color3.fromRGB(255, 85, 85)
- };
- ToggleButton.MouseButton1Down:Connect(function()
- if not Enabled then
- Enabled = true;
- ToggleButton.BackgroundColor3 = Colors.Enabled
- else
- Enabled = false;
- ToggleButton.BackgroundColor3 = Colors.Disabled
- end
- end)
- end
- warn("ENDED LOADING: CompletePhasesAutomatically")
- end
- if Configurations.DestroyButtons then
- warn("STARTED: DestroyButtons")
- ensure("Goto")
- local LeftFrameButtons = UI.ValidLeftFrameButtons
- for bName, i in pairs(LeftFrameButtons) do
- if Configurations.DestroyButtons[i] == true then
- UI.asyncDeleteFromLeftFrame(bName)
- end
- end
- warn("ENDED LOADING: DestroyButtons")
- end
- CoreGui:SetCore("SendNotification", {
- Title = "Script";
- Text = "Loading success;";
- Duration = 10;
- })
- warn("LOADED SUCCESSFULLY!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement