Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- math.randomseed(tick());
- local Player = game:GetService("Players").LocalPlayer;
- local GuiParent = (
- game:GetService("RunService"):IsStudio() and Player:WaitForChild("PlayerGui")
- );
- pcall(function()
- GuiParent = (
- ((GuiParent ~= nil) and GuiParent) or game:GetService("CoreGui")
- );
- end);
- local GuiParent = ((not GuiParent) and Player:WaitForChild("PlayerGui") or GuiParent);
- local RbxMods = Instance.new("ScreenGui", GuiParent);
- RbxMods.Name = "RbxMods";
- RbxMods.ResetOnSpawn = false;
- local Background = Instance.new("Frame", RbxMods);
- Background.Name = "Background";
- Background.ZIndex = 10;
- Background.BackgroundColor3 = Color3.fromRGB(50, 50, 50);
- Background.BorderColor3 = Background.BackgroundColor3;
- Background.BorderSizePixel = 0;
- Background.Position = UDim2.new(0, 10, 0, 10);
- Background.Size = UDim2.new(0, 220, 0, 20);
- local MenuSettings = {
- Defaults = {};
- CurrentStatuses = {};
- VisibleStatuses = {};
- Statuses = {};
- CurrentMenuAppendPosition = 22;
- FeatureLock = nil;
- };
- local FeatureChangeCallbacks = {};
- local function CycleSetting(Direction, Setting)
- if ((not MenuSettings.FeatureLock) or (Setting == "Features Lock")) then
- local CurrentPosition;
- local OldStatus = MenuSettings.CurrentStatuses[Setting];
- for Key, Value in next, MenuSettings.Statuses[Setting] do
- if (Value == OldStatus) then
- CurrentPosition = Key;
- end;
- end;
- local Key = CurrentPosition;
- if (Direction == "Forward") then
- Key = (Key + 1);
- elseif (Direction == "Backward") then
- Key = (Key - 1);
- end;
- if (Key > #MenuSettings.Statuses[Setting]) then
- Key = 1;
- elseif (Key < 1) then
- Key = #MenuSettings.Statuses[Setting];
- end;
- MenuSettings.CurrentStatuses[Setting] = MenuSettings.Statuses[Setting][Key];
- if (Setting == "Features Lock") then
- MenuSettings.FeatureLock = (not MenuSettings.FeatureLock);
- end;
- end;
- end;
- local function UpdateFeatureStatusCallback(StatusLabel, StatusSymbol, Data)
- local Text = MenuSettings.CurrentStatuses[Data.Name];
- local Prefix = (MenuSettings.Defaults[Text] and "" or "[");
- local Suffix = (MenuSettings.Defaults[Text] and "" or "]");
- if (((Prefix == "") and (Suffix == "")) and (not Data.CanBeDisabled)) then
- Prefix = "[";
- Suffix = "]";
- end;
- StatusLabel.Text = (Prefix..Text..Suffix);
- local Enabled = (
- not (MenuSettings.CurrentStatuses[Data.Name] == Data.Statuses[1])
- );
- StatusSymbol.BackgroundColor3 = (
- (Data.CanBeDisabled and (
- (Enabled and Color3.new(0, 1, 0)) or Color3.new(1, 0, 0)
- )
- ) or
- Color3.new(1, 0.7, 0)
- );
- if FeatureChangeCallbacks[Data.Name] then
- pcall(FeatureChangeCallbacks[Data.Name]);
- end;
- end;
- local function AddMenuItem(Type, Data)
- if (Type == "Category") then
- MenuSettings.VisibleStatuses[Data.Name] = Data.OpenStatus;
- local Category = Instance.new("Frame", Background);
- Category.Name = ("Category: "..Data.Name);
- Category.ZIndex = 10;
- Category.BackgroundColor3 = Color3.fromRGB(50, 50, 50);
- Category.BorderColor3 = Category.BackgroundColor3;
- Category.BorderSizePixel = 0;
- Category.BackgroundTransparency = 1;
- Category.Position = UDim2.new(
- 0, 0, 0,
- MenuSettings.CurrentMenuAppendPosition
- );
- Category.Size = UDim2.new(1, 0, 0, 20);
- local CategoryLabel = Instance.new("TextButton", Category);
- CategoryLabel.AutoButtonColor = false;
- CategoryLabel.Name = "CategoryLabel";
- CategoryLabel.ZIndex = 10;
- CategoryLabel.BackgroundColor3 = Color3.fromRGB(80, 80, 80);
- CategoryLabel.BorderColor3 = CategoryLabel.BackgroundColor3;
- CategoryLabel.BorderSizePixel = 0;
- CategoryLabel.Size = UDim2.new(1, 0, 0, 20);
- CategoryLabel.Text = (
- Data.Name.." ("..(
- (Data.OpenStatus and "Close") or ((not Data.OpenStatus) and "Open")
- )..")"
- );
- CategoryLabel.Font = Enum.Font.ArialBold;
- CategoryLabel.TextSize = 15;
- CategoryLabel.TextColor3 = Color3.new(0.85, 0.85, 0);
- CategoryLabel.TextStrokeColor3 = CategoryLabel.TextColor3;
- Background.Size = (Background.Size + UDim2.new(0, 0, 0, 22));
- MenuSettings.CurrentMenuAppendPosition = (
- MenuSettings.CurrentMenuAppendPosition + 22
- );
- elseif (Type == "Feature") then
- MenuSettings.Statuses[Data.Name] = Data.Statuses;
- MenuSettings.Defaults[Data.Statuses[1]] = true;
- if (not MenuSettings.CurrentStatuses[Data.Name]) then
- MenuSettings.CurrentStatuses[Data.Name] = Data.Statuses[1];
- end;
- local FeatureHolder = Instance.new(
- "Frame",
- Background:FindFirstChild("Category: "..Data.Category)
- );
- FeatureHolder.Name = ("Feature: "..Data.Name);
- FeatureHolder.ZIndex = 10;
- FeatureHolder.BackgroundColor3 = Color3.fromRGB(50, 50, 50);
- FeatureHolder.BorderColor3 = FeatureHolder.BackgroundColor3;
- FeatureHolder.BorderSizePixel = 0;
- FeatureHolder.BackgroundTransparency = 1;
- FeatureHolder.Position = UDim2.new(0, 0, 0, 20);
- FeatureHolder.Size = UDim2.new(1, 0, 0, 20);
- local Divider = Instance.new("Frame", FeatureHolder);
- Divider.Name = "Divider";
- Divider.ZIndex = 10;
- Divider.BackgroundColor3 = Color3.fromRGB(200, 200, 200);
- Divider.BorderColor3 = Divider.BackgroundColor3;
- Divider.BorderSizePixel = 0;
- Divider.Size = UDim2.new(0, 2, 1, 2);
- Divider.Position = UDim2.new(
- 0, 19, 0,
- (1 + (22 * (Data.FeaturePositionFactor - 1)))
- );
- local StatusSymbol = Instance.new("Frame", FeatureHolder);
- StatusSymbol.Name = "StatusSymbol";
- StatusSymbol.ZIndex = 10;
- StatusSymbol.BorderColor3 = Background.BackgroundColor3;
- StatusSymbol.BorderSizePixel = 0;
- StatusSymbol.Size = UDim2.new(0, 15, 0, 14);
- StatusSymbol.Position = UDim2.new(
- 0, 2, 0.5,
- (-6 + (22 * (Data.FeaturePositionFactor - 1)))
- );
- local FeatureLabel = Instance.new("TextLabel", FeatureHolder);
- FeatureLabel.Name = "FeatureLabel";
- FeatureLabel.ZIndex = 10;
- FeatureLabel.BackgroundColor3 = Color3.fromRGB(50, 50, 50);
- FeatureLabel.BorderColor3 = FeatureLabel.BackgroundColor3;
- FeatureLabel.BorderSizePixel = 0;
- FeatureLabel.BackgroundTransparency = 1;
- FeatureLabel.Size = UDim2.new(0, 1, 1, 0);
- FeatureLabel.Position = (Divider.Position + UDim2.new(0, 3, 0, 0));
- FeatureLabel.Text = Data.Name;
- FeatureLabel.Font = Enum.Font.ArialBold;
- FeatureLabel.TextSize = 14;
- FeatureLabel.TextColor3 = Color3.new(1, 1, 1);
- FeatureLabel.TextStrokeColor3 = FeatureLabel.TextColor3;
- FeatureLabel.TextXAlignment = Enum.TextXAlignment.Left;
- local StatusLabel = Instance.new("TextButton", FeatureHolder);
- StatusLabel.AutoButtonColor = false;
- StatusLabel.Name = "StatusLabel";
- StatusLabel.ZIndex = 10;
- StatusLabel.BackgroundColor3 = Color3.fromRGB(50, 50, 50);
- StatusLabel.BorderColor3 = StatusLabel.BackgroundColor3;
- StatusLabel.BorderSizePixel = 0;
- StatusLabel.BackgroundTransparency = 1;
- StatusLabel.Font = Enum.Font.ArialBold;
- StatusLabel.TextSize = 14;
- StatusLabel.TextColor3 = Color3.new(1, 1, 1);
- StatusLabel.TextStrokeColor3 = StatusLabel.TextColor3;
- StatusLabel.TextXAlignment = Enum.TextXAlignment.Right;
- StatusLabel.Size = UDim2.new(0, StatusLabel.TextBounds.X, 1, 0);
- StatusLabel.Position = UDim2.new(
- 1, -(StatusLabel.Size.X.Offset + 1), 0,
- (22 * (Data.FeaturePositionFactor - 1))
- );
- UpdateFeatureStatusCallback(StatusLabel, StatusSymbol, Data);
- StatusLabel.MouseButton1Click:Connect(function()
- CycleSetting("Forward", Data.Name);
- UpdateFeatureStatusCallback(StatusLabel, StatusSymbol, Data);
- end);
- StatusLabel.MouseButton2Click:Connect(function()
- CycleSetting("Backward", Data.Name);
- UpdateFeatureStatusCallback(StatusLabel, StatusSymbol, Data);
- end);
- Background.Size = (Background.Size + UDim2.new(0, 0, 0, 22));
- MenuSettings.CurrentMenuAppendPosition = (
- MenuSettings.CurrentMenuAppendPosition + 22
- );
- end;
- end;
- function RenderMenu(
- RenderTestDropdown,
- RenderMenuSettings
- )
- Background:ClearAllChildren();
- local IsInUse = (
- RenderTestDropdown or
- RenderMenuSettings
- );
- Background.Size = UDim2.new(0, 220, 0, (IsInUse and 23 or 20));
- local TopLabel = Instance.new("TextLabel", Background);
- TopLabel.Name = "TopLabel";
- TopLabel.ZIndex = 10;
- TopLabel.BackgroundColor3 = Color3.fromRGB(80, 80, 80);
- TopLabel.BorderColor3 = TopLabel.BackgroundColor3;
- TopLabel.BorderSizePixel = 0;
- TopLabel.Size = UDim2.new(1, 0, 0, 20);
- TopLabel.Text = "RbxMods [vD] || By: Programmeh";
- TopLabel.Font = Enum.Font.ArialBold;
- TopLabel.TextSize = 15;
- TopLabel.TextColor3 = Color3.new(1, 1, 1);
- TopLabel.TextStrokeColor3 = TopLabel.TextColor3;
- MenuSettings.CurrentMenuAppendPosition = 22;
- AddMenuItem(
- "Category",
- {
- Name = "Test";
- OpenStatus = RenderTestDropdown;
- }
- );
- if RenderTestDropdown then
- AddMenuItem(
- "Feature",
- {
- Name = "Penis";
- CanBeDisabled = true;
- Statuses = {
- "Tiny";
- "Huge";
- };
- Category = "Test";
- FeaturePositionFactor = 1;
- }
- );
- end;
- AddMenuItem(
- "Category",
- {
- Name = "Menu";
- OpenStatus = RenderMenuSettings;
- }
- );
- if RenderMenuSettings then
- AddMenuItem(
- "Feature",
- {
- Name = "Menu Toggle Key";
- CanBeDisabled = false;
- Statuses = {
- "Delete";
- "Insert";
- };
- Category = "Menu";
- FeaturePositionFactor = 1;
- }
- );
- AddMenuItem(
- "Feature",
- {
- Name = "Menu Theme";
- CanBeDisabled = false;
- Statuses = {
- "Dark";
- "Light";
- };
- Category = "Menu";
- FeaturePositionFactor = 2;
- }
- );
- AddMenuItem(
- "Feature",
- {
- Name = "Features Lock";
- CanBeDisabled = true;
- Statuses = {
- "Disabled";
- "Enabled";
- };
- Category = "Menu";
- FeaturePositionFactor = 3
- }
- );
- end;
- local Categories = {
- "Test";
- "Menu";
- };
- for Key, Value in next, Categories do
- Background:FindFirstChild(
- "Category: "..Value
- ):FindFirstChildOfClass("TextButton").MouseButton1Click:Connect(function()
- MenuSettings.VisibleStatuses[Value] = (
- not MenuSettings.VisibleStatuses[Value]
- );
- RenderMenu(
- MenuSettings.VisibleStatuses.Test,
- MenuSettings.VisibleStatuses.Menu
- );
- end);
- end;
- if FeatureChangeCallbacks["Menu Theme"] then
- pcall(FeatureChangeCallbacks["Menu Theme"]);
- end;
- end;
- RenderMenu(
- true,
- true
- );
- RenderMenu(
- false,
- false
- );
- game:GetService("UserInputService").InputBegan:Connect(function(
- InputObject,
- GameProcessedEvent
- )
- if (
- (not GameProcessedEvent) and
- (InputObject.UserInputType == Enum.UserInputType.Keyboard)
- ) then
- if (
- InputObject.KeyCode ==
- Enum.KeyCode[MenuSettings.CurrentStatuses["Menu Toggle Key"]]
- ) then
- Background.Visible = (not Background.Visible);
- end;
- end;
- end);
- local CachedDarkTheme = {};
- local Cached;
- FeatureChangeCallbacks["Menu Theme"] = function()
- local function AttemptToCache()
- if (not Cached) then
- Cached = true;
- for Key, Value in next, Background:GetDescendants() do
- local Success = pcall(function()
- return Value.TextColor3;
- end);
- if Success then
- CachedDarkTheme[Value.Name] = {
- BackgroundColor = Value.BackgroundColor3;
- TextColor = Value.TextColor3;
- };
- if Value.Name:find("Close") then
- CachedDarkTheme[
- Value.Name:gsub("Close", "Open")
- ] = CachedDarkTheme[Value.Name];
- elseif Value.Name:find("Open") then
- CachedDarkTheme[
- Value.Name:gsub("Open", "Close")
- ] = CachedDarkTheme[Value.Name];
- end;
- else
- CachedDarkTheme[Value.Name] = {
- BackgroundColor = Value.BackgroundColor3;
- };
- if Value.Name:find("Close") then
- CachedDarkTheme[
- Value.Name:gsub("Close", "Open")
- ] = CachedDarkTheme[Value.Name];
- elseif Value.Name:find("Open") then
- CachedDarkTheme[
- Value.Name:gsub("Open", "Close")
- ] = CachedDarkTheme[Value.Name];
- end;
- end;
- end;
- end;
- end;
- local function SetColor(Type, GuiObject, RGBColor3)
- if (Type == "Background") then
- GuiObject.BackgroundColor3 = RGBColor3;
- GuiObject.BorderColor3 = RGBColor3;
- elseif (Type == "Text") then
- GuiObject.TextColor3 = RGBColor3;
- GuiObject.TextStrokeColor3 = RGBColor3;
- elseif (Type == "Both") then
- GuiObject.BackgroundColor3 = RGBColor3;
- GuiObject.BorderColor3 = RGBColor3;
- GuiObject.TextColor3 = RGBColor3;
- GuiObject.TextStrokeColor3 = RGBColor3;
- end
- end;
- if (MenuSettings.CurrentStatuses["Menu Theme"] == "Dark") then
- if CachedDarkTheme.Background then
- for Key, Value in next, Background:GetDescendants() do
- pcall(SetColor, "Both", Value, CachedDarkTheme[Value.Name]);
- end;
- end;
- local RGB50 = Color3.fromRGB(50, 50, 50);
- local RGB80 = Color3.fromRGB(80, 80, 80);
- local RGB1 = Color3.new(1, 1, 1);
- for Key, Value in next, Background:GetDescendants() do
- if Value:IsA("TextButton") then
- SetColor("Background", Value, RGB50);
- SetColor("Text", Value, RGB1);
- if Value.Text:find("%(%w+%)") then
- SetColor("Background", Value, RGB80);
- SetColor("Text", Value, Color3.new(1, 1, 0));
- end;
- elseif (Value:IsA("TextLabel") and (Value.Name ~= "TopLabel")) then
- SetColor("Background", Value, RGB50);
- SetColor("Text", Value, RGB1);
- end;
- end;
- SetColor("Background", Background, RGB50);
- SetColor("Background", Background.TopLabel, RGB80);
- SetColor("Text", Background.TopLabel, RGB1);
- elseif (MenuSettings.CurrentStatuses["Menu Theme"] == "Light") then
- AttemptToCache();
- local RGB210 = Color3.fromRGB(210, 210, 210);
- local RGB1 = Color3.new(1, 1, 1);
- local RGB0 = Color3.new(0, 0, 0);
- SetColor("Background", Background, RGB210);
- SetColor("Background", Background.TopLabel, RGB1);
- SetColor("Text", Background.TopLabel, RGB0);
- for Key, Value in next, Background:GetDescendants() do
- if Value:IsA("TextButton") then
- SetColor("Background", Value, RGB210);
- SetColor("Text", Value, Color3.new(0, 0, 0));
- if Value.Text:find("%(%w+%)") then
- SetColor("Background", Value, RGB1);
- SetColor("Text", Value, Color3.new(0, 0, 1));
- end;
- elseif (Value:IsA("TextLabel") and (Value.Name ~= "TopLabel")) then
- SetColor("Background", Value, RGB210);
- SetColor("Text", Value, RGB0);
- end;
- end;
- end;
- end;
- print("[RbxMods]: Script loaded! Created by: Programmeh@V3rmillion.net");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement