Better Dex By Rafan Keyless

publicluaupdated
loadstring(game:HttpGet("https://pasteblox.com/raw/spacerfngd/subscribetofredbear555"))()
pbx pull 7jaqyr2wddraw link never changes · v1 live
better-dex-by-rafan-keyless.lua
assert(plugin, "Better Dex must run as a Roblox Studio Plugin.");
local TweenService = game:GetService("TweenService");
local Selection = game:GetService("Selection");
local ChangeHistoryService = game:GetService("ChangeHistoryService");
local ScriptEditorService = game:GetService("ScriptEditorService");
local UserInputService = game:GetService("UserInputService");
local BRAND = "Better Dex By Rafan (MayBeeHub)";
local VERSION = "2.0.0";
local SETTINGS_TUTORIAL_KEY = "BetterDex_TutorialCompleted_v2";
local C = {bg=Color3.fromRGB(17, 22, 42),surface=Color3.fromRGB(25, 32, 58),surface2=Color3.fromRGB(31, 40, 69),surface3=Color3.fromRGB(39, 50, 82),line=Color3.fromRGB(55, 72, 108),cyan=Color3.fromRGB(0, 225, 245),cyan2=Color3.fromRGB(0, 170, 210),cyanSoft=Color3.fromRGB(90, 235, 245),text=Color3.fromRGB(235, 245, 255),muted=Color3.fromRGB(145, 165, 190),green=Color3.fromRGB(65, 190, 135),red=Color3.fromRGB(225, 82, 100),amber=Color3.fromRGB(245, 185, 80)};
local function make(className, props, parent)
	local object = Instance.new(className);
	for key, value in pairs(props or {}) do
		object[key] = value;
	end
	object.Parent = parent;
	return object;
end
local function addCorner(object, radius)
	make("UICorner", {CornerRadius=UDim.new(0, radius or 8)}, object);
end
local function addStroke(object, color, transparency, thickness)
	return make("UIStroke", {Color=(color or C.line),Transparency=(transparency or 0),Thickness=(thickness or 1)}, object);
end
local function tween(object, duration, properties, style, direction)
	local info = TweenInfo.new(duration, style or Enum.EasingStyle.Quint, direction or Enum.EasingDirection.Out);
	local animation = TweenService:Create(object, info, properties);
	animation:Play();
	return animation;
end
local function safeGet(instance, property)
	local ok, value = pcall(function()
		return instance[property];
	end);
	if ok then
		return value;
	end
	return nil;
end
local function safeString(value)
	local ok, result = pcall(tostring, value);
	return (ok and result) or "<unavailable>";
end
local function setStatus(text, color)
	if _G.__BETTER_DEX_STATUS then
		_G.__BETTER_DEX_STATUS(text, color);
	end
end
local function performChange(name, displayName, callback)
	local recording;
	local beginOk, beginResult = pcall(function()
		return ChangeHistoryService:TryBeginRecording(name, displayName or name);
	end);
	if beginOk then
		recording = beginResult;
	end
	if not recording then
		setStatus("Studio tidak dapat memulai recording undo. Coba di Edit mode.", C.amber);
		return false, "Could not begin ChangeHistory recording";
	end
	local ok, result = pcall(callback);
	local finishOk, finishError = pcall(function()
		ChangeHistoryService:FinishRecording(recording, (ok and Enum.FinishRecordingOperation.Commit) or Enum.FinishRecordingOperation.Cancel);
	end);
	if not ok then
		setStatus("Action failed: " .. safeString(result), C.red);
		return false, result;
	end
	if not finishOk then
		setStatus("ChangeHistory warning: " .. safeString(finishError), C.amber);
	end
	return true, result;
end
local toolbar = plugin:CreateToolbar("Better Dex");
local toggleButton = toolbar:CreateButton("BetterDexOpen", "Open Better Dex By Rafan (MayBeeHub)", "");
toggleButton.ClickableWhenViewportHidden = true;
local widgetInfo = DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float, true, false, 760, 820, 570, 520);
local widget = plugin:CreateDockWidgetPluginGuiAsync("BetterDex_Rafan_MayBeeHub_v2", widgetInfo);
widget.Title = BRAND;
widget.ZIndexBehavior = Enum.ZIndexBehavior.Sibling;
toggleButton.Click:Connect(function()
	widget.Enabled = not widget.Enabled;
end);
widget:BindToClose(function()
end);
local root = make("Frame", {Name="Root",Size=UDim2.fromScale(1, 1),BackgroundColor3=C.bg,BorderSizePixel=0,ClipsDescendants=true}, widget);
local rootGradient = make("UIGradient", {Color=ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(20, 29, 57)),ColorSequenceKeypoint.new(1, Color3.fromRGB(13, 18, 35))}),Rotation=90}, root);
local header = make("Frame", {Name="Header",Size=UDim2.new(1, 0, 0, 62),BackgroundColor3=C.surface,BorderSizePixel=0,ZIndex=2}, root);
make("UIGradient", {Color=ColorSequence.new(C.surface2, C.surface),Rotation=0}, header);
local brandMark = make("Frame", {Position=UDim2.fromOffset(14, 12),Size=UDim2.fromOffset(38, 38),BackgroundColor3=C.cyan2,BorderSizePixel=0,ZIndex=3}, header);
addCorner(brandMark, 11);
addStroke(brandMark, C.cyan, 0.2, 1.3);
make("TextLabel", {Size=UDim2.fromScale(1, 1),BackgroundTransparency=1,Text="BD",TextColor3=C.bg,Font=Enum.Font.GothamBlack,TextSize=17,ZIndex=4}, brandMark);
make("TextLabel", {Position=UDim2.fromOffset(62, 8),Size=UDim2.new(1, -260, 0, 25),BackgroundTransparency=1,Text="BETTER DEX",TextColor3=C.text,Font=Enum.Font.GothamBlack,TextSize=17,TextXAlignment=Enum.TextXAlignment.Left,ZIndex=3}, header);
make("TextLabel", {Position=UDim2.fromOffset(63, 32),Size=UDim2.new(1, -260, 0, 17),BackgroundTransparency=1,Text=("By Rafan (MayBeeHub)  •  v" .. VERSION),TextColor3=C.cyanSoft,Font=Enum.Font.GothamMedium,TextSize=10,TextXAlignment=Enum.TextXAlignment.Left,ZIndex=3}, header);
local function headerButton(text, rightOffset, tooltip)
	local button = make("TextButton", {AnchorPoint=Vector2.new(1, 0.5),Position=UDim2.new(1, -rightOffset, 0.5, 0),Size=UDim2.fromOffset(34, 32),BackgroundColor3=C.surface3,Text=text,TextColor3=C.text,Font=Enum.Font.GothamBold,TextSize=14,AutoButtonColor=false,BorderSizePixel=0,ZIndex=3}, header);
	addCorner(button, 8);
	addStroke(button, C.line, 0.25, 1);
	button.MouseEnter:Connect(function()
		tween(button, 0.13, {BackgroundColor3=C.cyan2});
	end);
	button.MouseLeave:Connect(function()
		tween(button, 0.13, {BackgroundColor3=C.surface3});
	end);
	button:SetAttribute("Tooltip", tooltip or "");
	return button;
end
local helpButton = headerButton("?", 126, "Open tutorial");
local refreshButton = headerButton("↻", 84, "Refresh explorer");
local minimizeButton = headerButton("×", 42, "Close Better Dex panel");
minimizeButton.MouseButton1Click:Connect(function()
	widget.Enabled = false;
end);
local sidebar = make("Frame", {Position=UDim2.fromOffset(0, 62),Size=UDim2.new(0, 58, 1, -62),BackgroundColor3=C.surface,BorderSizePixel=0,ZIndex=1}, root);
local sidebarLine = make("Frame", {Position=UDim2.new(1, -1, 0, 0),Size=UDim2.new(0, 1, 1, 0),BackgroundColor3=C.line,BackgroundTransparency=0.35,BorderSizePixel=0}, sidebar);
local content = make("Frame", {Position=UDim2.fromOffset(58, 62),Size=UDim2.new(1, -58, 1, -62),BackgroundTransparency=1,BorderSizePixel=0}, root);
local navButtons = {};
local function navButton(glyph, label, y)
	local button = make("TextButton", {Position=UDim2.fromOffset(7, y),Size=UDim2.fromOffset(44, 48),BackgroundColor3=C.surface,Text=(glyph .. "\n" .. label),TextColor3=C.muted,Font=Enum.Font.GothamBold,TextSize=10,AutoButtonColor=false,BorderSizePixel=0,ZIndex=2}, sidebar);
	addCorner(button, 9);
	navButtons[label] = button;
	button.MouseEnter:Connect(function()
		if (button:GetAttribute("Active") ~= true) then
			tween(button, 0.12, {BackgroundColor3=C.surface2,TextColor3=C.text});
		end
	end);
	button.MouseLeave:Connect(function()
		if (button:GetAttribute("Active") ~= true) then
			tween(button, 0.12, {BackgroundColor3=C.surface,TextColor3=C.muted});
		end
	end);
	return button;
end
local explorerNav = navButton("⌕", "Explorer", 15);
local createNav = navButton("+", "Create", 72);
local toolsNav = navButton("⚙", "Tools", 129);
local contentTop = make("Frame", {Size=UDim2.new(1, -20, 0, 42),Position=UDim2.fromOffset(10, 9),BackgroundTransparency=1}, content);
local searchBox = make("TextBox", {Size=UDim2.new(1, -390, 0, 34),Position=UDim2.fromOffset(0, 3),BackgroundColor3=C.surface2,TextColor3=C.text,PlaceholderColor3=C.muted,PlaceholderText="Search instances...",Text="",ClearTextOnFocus=false,Font=Enum.Font.Gotham,TextSize=11,TextXAlignment=Enum.TextXAlignment.Left,BorderSizePixel=0}, contentTop);
addCorner(searchBox, 8);
addStroke(searchBox, C.line, 0.4, 1);
local function actionButton(parent, text, width, color)
	local button = make("TextButton", {Size=UDim2.fromOffset(width, 32),BackgroundColor3=(color or C.surface2),Text=text,TextColor3=C.text,Font=Enum.Font.GothamBold,TextSize=10,AutoButtonColor=false,BorderSizePixel=0}, parent);
	addCorner(button, 7);
	addStroke(button, C.line, 0.45, 1);
	button.MouseEnter:Connect(function()
		tween(button, 0.12, {BackgroundColor3=((color and color:Lerp(C.cyan, 0.12)) or C.surface3)});
	end);
	button.MouseLeave:Connect(function()
		tween(button, 0.12, {BackgroundColor3=(color or C.surface2)});
	end);
	return button;
end
local addObjectButton = actionButton(contentTop, "+ Object", 74, C.cyan2);
addObjectButton.Position = UDim2.new(1, -382, 0, 4);
local addScriptButton = actionButton(contentTop, "+ Script", 74, C.green);
addScriptButton.Position = UDim2.new(1, -302, 0, 4);
local duplicateButton = actionButton(contentTop, "Duplicate", 76);
duplicateButton.Position = UDim2.new(1, -220, 0, 4);
local deleteButton = actionButton(contentTop, "Delete", 64, C.red);
deleteButton.Position = UDim2.new(1, -138, 0, 4);
local explorerPanel = make("Frame", {Position=UDim2.fromOffset(10, 58),Size=UDim2.new(1, -20, 0.51, -58),BackgroundColor3=C.surface,BorderSizePixel=0}, content);
addCorner(explorerPanel, 10);
addStroke(explorerPanel, C.line, 0.25, 1);
local explorerPanelHeader = make("Frame", {Size=UDim2.new(1, 0, 0, 30),BackgroundColor3=C.surface2,BorderSizePixel=0}, explorerPanel);
addCorner(explorerPanelHeader, 10);
make("TextLabel", {Position=UDim2.fromOffset(12, 0),Size=UDim2.new(1, -24, 1, 0),BackgroundTransparency=1,Text="EXPLORER  /  DATA MODEL",TextColor3=C.cyanSoft,Font=Enum.Font.GothamBold,TextSize=10,TextXAlignment=Enum.TextXAlignment.Left}, explorerPanelHeader);
local tree = make("ScrollingFrame", {Position=UDim2.fromOffset(6, 34),Size=UDim2.new(1, -12, 1, -40),BackgroundTransparency=1,BorderSizePixel=0,ScrollBarThickness=5,ScrollBarImageColor3=C.cyan2,CanvasSize=UDim2.new()}, explorerPanel);
local treeLayout = make("UIListLayout", {Padding=UDim.new(0, 1),SortOrder=Enum.SortOrder.LayoutOrder}, tree);
local propsPanel = make("Frame", {Position=UDim2.new(0, 10, 0.51, 8),Size=UDim2.new(1, -20, 0.49, -54),BackgroundColor3=C.surface,BorderSizePixel=0}, content);
addCorner(propsPanel, 10);
addStroke(propsPanel, C.line, 0.25, 1);
local propsHeader = make("Frame", {Size=UDim2.new(1, 0, 0, 32),BackgroundColor3=C.surface2,BorderSizePixel=0}, propsPanel);
addCorner(propsHeader, 10);
make("TextLabel", {Position=UDim2.fromOffset(12, 0),Size=UDim2.new(0.5, -12, 1, 0),BackgroundTransparency=1,Text="PROPERTIES",TextColor3=C.cyanSoft,Font=Enum.Font.GothamBold,TextSize=10,TextXAlignment=Enum.TextXAlignment.Left}, propsHeader);
local propertySearch = make("TextBox", {AnchorPoint=Vector2.new(1, 0.5),Position=UDim2.new(1, -9, 0.5, 0),Size=UDim2.new(0.5, -10, 0, 23),BackgroundColor3=C.surface3,TextColor3=C.text,PlaceholderColor3=C.muted,PlaceholderText="Filter properties...",Text="",ClearTextOnFocus=false,Font=Enum.Font.Gotham,TextSize=10,BorderSizePixel=0}, propsHeader);
addCorner(propertySearch, 6);
local propsScroll = make("ScrollingFrame", {Position=UDim2.fromOffset(6, 36),Size=UDim2.new(1, -12, 1, -42),BackgroundTransparency=1,BorderSizePixel=0,ScrollBarThickness=5,ScrollBarImageColor3=C.cyan2,CanvasSize=UDim2.new()}, propsPanel);
local propsLayout = make("UIListLayout", {Padding=UDim.new(0, 2),SortOrder=Enum.SortOrder.LayoutOrder}, propsScroll);
local footer = make("Frame", {AnchorPoint=Vector2.new(0, 1),Position=UDim2.new(1, -10, 1, -9),Size=UDim2.new(1, -20, 0, 26),BackgroundColor3=C.surface2,BorderSizePixel=0}, content);
addCorner(footer, 7);
local footerStatus = make("TextLabel", {Position=UDim2.fromOffset(10, 0),Size=UDim2.new(1, -20, 1, 0),BackgroundTransparency=1,Text="Ready  •  Select an Instance to inspect it",TextColor3=C.muted,Font=Enum.Font.Gotham,TextSize=10,TextXAlignment=Enum.TextXAlignment.Left}, footer);
_G.__BETTER_DEX_STATUS = function(text, color)
	if (footerStatus and footerStatus.Parent) then
		footerStatus.Text = tostring(text);
		footerStatus.TextColor3 = color or C.muted;
	end
end;
local activeToast;
local function toast(message, color)
	if activeToast then
		activeToast:Destroy();
	end
	local card = make("Frame", {AnchorPoint=Vector2.new(0.5, 0),Position=UDim2.new(0.5, 0, 0, 70),Size=UDim2.fromOffset(320, 42),BackgroundColor3=C.surface3,BackgroundTransparency=0.08,BorderSizePixel=0,ZIndex=90}, root);
	activeToast = card;
	addCorner(card, 9);
	addStroke(card, color or C.cyan, 0.1, 1.2);
	local text = make("TextLabel", {Size=UDim2.new(1, -20, 1, 0),Position=UDim2.fromOffset(10, 0),BackgroundTransparency=1,Text=message,TextColor3=C.text,TextSize=11,Font=Enum.Font.GothamMedium,TextWrapped=true,ZIndex=91}, card);
	card.Position = UDim2.new(0.5, 0, 0, 48);
	tween(card, 0.25, {Position=UDim2.new(0.5, 0, 0, 72)});
	task.delay(2.6, function()
		if (card and card.Parent) then
			tween(card, 0.2, {BackgroundTransparency=1,Position=UDim2.new(0.5, 0, 0, 56)});
			task.wait(0.22);
			if card then
				card:Destroy();
			end
		end
	end);
end
local selected = workspace;
local expanded = {[game]=true,[workspace]=true};
local searchQuery = "";
local propertyQuery = "";
local refreshing = false;
local showProperties;
local refreshExplorer;
local showTutorial;
local showChoicePopup;
local function isValidParent(instance)
	return (typeof(instance) == "Instance") and (instance.Parent ~= nil);
end
local function updateSelection(instance)
	if (not isValidParent(instance) and (instance ~= game)) then
		instance = workspace;
	end
	selected = instance;
	pcall(function()
		Selection:Set({instance});
	end);
end
local function clearGui(container, keepLayout)
	for _, child in ipairs(container:GetChildren()) do
		if not (keepLayout and (child == keepLayout)) then
			child:Destroy();
		end
	end
end
local function addPropertyRow(name, value, editorType, setter, choices)
	if ((propertyQuery ~= "") and not name:lower():find(propertyQuery, 1, true)) then
		return;
	end
	local row = make("Frame", {Size=UDim2.new(1, -4, 0, 29),BackgroundColor3=C.surface2,BorderSizePixel=0}, propsScroll);
	addCorner(row, 5);
	make("TextLabel", {Position=UDim2.fromOffset(8, 0),Size=UDim2.new(0.36, -8, 1, 0),BackgroundTransparency=1,Text=name,TextColor3=C.muted,Font=Enum.Font.Gotham,TextSize=10,TextXAlignment=Enum.TextXAlignment.Left,TextTruncate=Enum.TextTruncate.AtEnd}, row);
	if (editorType == "bool") then
		local toggle = make("TextButton", {AnchorPoint=Vector2.new(1, 0.5),Position=UDim2.new(1, -8, 0.5, 0),Size=UDim2.fromOffset(66, 21),BackgroundColor3=((value and C.green) or C.surface3),Text=((value and "ON") or "OFF"),TextColor3=C.text,Font=Enum.Font.GothamBold,TextSize=9,BorderSizePixel=0}, row);
		addCorner(toggle, 6);
		toggle.MouseButton1Click:Connect(function()
			local ok, err = performChange("Edit " .. name, "Change " .. name, function()
				setter(not value);
			end);
			if ok then
				toast(name .. " updated", C.green);
			else
				toast("Could not update " .. name, C.red);
			end
			if selected then
				showProperties(selected);
			end
			refreshExplorer();
		end);
	elseif (editorType == "choice") then
		local choiceButton = make("TextButton", {AnchorPoint=Vector2.new(1, 0.5),Position=UDim2.new(1, -8, 0.5, 0),Size=UDim2.new(0.58, -10, 0, 22),BackgroundColor3=C.surface3,Text=(safeString(value) .. "  ▾"),TextColor3=C.text,Font=Enum.Font.Gotham,TextSize=9,BorderSizePixel=0,TextTruncate=Enum.TextTruncate.AtEnd}, row);
		addCorner(choiceButton, 5);
		choiceButton.MouseButton1Click:Connect(function()
			local opts = choices or {};
			showChoicePopup(name, opts, function(choice)
				local ok = performChange("Set " .. name, "Set " .. name, function()
					setter(choice);
				end);
				if ok then
					toast(name .. " updated", C.green);
				end
				if selected then
					showProperties(selected);
				end
			end);
		end);
	else
		local input = make("TextBox", {AnchorPoint=Vector2.new(1, 0.5),Position=UDim2.new(1, -8, 0.5, 0),Size=UDim2.new(0.58, -10, 0, 22),BackgroundColor3=C.surface3,Text=safeString(value),TextColor3=C.text,PlaceholderColor3=C.muted,PlaceholderText="Enter value",Font=Enum.Font.Gotham,TextSize=9,ClearTextOnFocus=false,TextXAlignment=Enum.TextXAlignment.Left,BorderSizePixel=0,TextTruncate=Enum.TextTruncate.AtEnd}, row);
		addCorner(input, 5);
		input.FocusLost:Connect(function(enterPressed)
			if not enterPressed then
				return;
			end
			local ok, result = performChange("Edit " .. name, "Edit " .. name, function()
				setter(input.Text);
			end);
			if ok then
				toast(name .. " updated", C.green);
				if selected then
					showProperties(selected);
				end
				refreshExplorer();
			else
				toast("Invalid value for " .. name .. ": " .. safeString(result), C.red);
				if selected then
					showProperties(selected);
				end
lines 1–300 of 971open raw find-in-page only searches the lines loaded so far. "show all" loads the rest.

changelog

1 version
  1. first version

    live

    @spacerfngd·