slap dules
Key Required

slap dules

Slap DUELS [🎉UPD!]x3rscriptsx3rscripts 1K views 674 executesUpdated Mar 9, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•1181 lines (31755 chars)
--// X3R - DULES Advanced Panel
--// LocalScript only
--// Place in StarterPlayer > StarterPlayerScripts
--// No RemoteEvent / No RemoteFunction

--==================================================
-- SERVICES
--==================================================
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Lighting = game:GetService("Lighting")

--==================================================
-- PLAYER
--==================================================
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

--==================================================
-- CONFIG
--==================================================
local CONFIG = {
	KEY = "DULES",

	UI_SIZE = UDim2.new(0, 460, 0, 345),
	UI_CLOSED_SIZE = UDim2.new(0, 460, 0, 0),

	KEY_SIZE = UDim2.new(0, 360, 0, 225),
	KEY_CLOSED_SIZE = UDim2.new(0, 360, 0, 0),

	FLOAT_SIZE = UDim2.new(0, 58, 0, 58),

	BLUR_SIZE = 18,
	WALKSPEED = 50,

	ANIM_FAST = 0.12,
	ANIM_MED = 0.22,
	ANIM_SLOW = 0.30,
}

local COLORS = {
	BG = Color3.fromRGB(9, 9, 9),
	BG2 = Color3.fromRGB(14, 14, 14),
	PANEL = Color3.fromRGB(18, 18, 18),
	PANEL2 = Color3.fromRGB(24, 24, 24),
	PANEL3 = Color3.fromRGB(29, 29, 29),

	RED = Color3.fromRGB(220, 32, 32),
	RED2 = Color3.fromRGB(160, 20, 20),
	RED3 = Color3.fromRGB(90, 14, 14),

	WHITE = Color3.fromRGB(245, 245, 245),
	LIGHT = Color3.fromRGB(205, 205, 205),
	GRAY = Color3.fromRGB(145, 145, 145),
	DARKGRAY = Color3.fromRGB(100, 100, 100),

	SUCCESS = Color3.fromRGB(90, 255, 125),
	ERROR = Color3.fromRGB(255, 90, 90),
	WARN = Color3.fromRGB(255, 190, 80),
}

--==================================================
-- STATE
--==================================================
local unlocked = false
local uiOpen = false
local currentTab = "Actions"
local currentWalkspeedBoosted = false

--==================================================
-- UTILS
--==================================================
local function create(className, props, children)
	local instance = Instance.new(className)
	for k, v in pairs(props or {}) do
		instance[k] = v
	end
	for _, child in ipairs(children or {}) do
		child.Parent = instance
	end
	return instance
end

local function makeCorner(obj, radius)
	local c = Instance.new("UICorner")
	c.CornerRadius = radius or UDim.new(0, 12)
	c.Parent = obj
	return c
end

local function makeStroke(obj, color, thickness, transparency)
	local s = Instance.new("UIStroke")
	s.Color = color or COLORS.RED
	s.Thickness = thickness or 1.4
	s.Transparency = transparency or 0
	s.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
	s.Parent = obj
	return s
end

local function makePadding(obj, left, right, top, bottom)
	local p = Instance.new("UIPadding")
	p.PaddingLeft = UDim.new(0, left or 0)
	p.PaddingRight = UDim.new(0, right or 0)
	p.PaddingTop = UDim.new(0, top or 0)
	p.PaddingBottom = UDim.new(0, bottom or 0)
	p.Parent = obj
	return p
end

local function tween(obj, info, props)
	local tw = TweenService:Create(obj, info, props)
	tw:Play()
	return tw
end

local function fastTween(obj, props)
	return tween(obj, TweenInfo.new(CONFIG.ANIM_FAST, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), props)
end

local function medTween(obj, props)
	return tween(obj, TweenInfo.new(CONFIG.ANIM_MED, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), props)
end

local function slowTween(obj, props)
	return tween(obj, TweenInfo.new(CONFIG.ANIM_SLOW, Enum.EasingStyle.Back, Enum.EasingDirection.Out), props)
end

local function pulse(button)
	local originalSize = button.Size
	local shrink = UDim2.new(originalSize.X.Scale, originalSize.X.Offset - 4, originalSize.Y.Scale, originalSize.Y.Offset - 2)

	tween(button, TweenInfo.new(0.07, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
		Size = shrink
	})

	task.delay(0.08, function()
		if button and button.Parent then
			tween(button, TweenInfo.new(0.10, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
				Size = originalSize
			})
		end
	end)
end

local function popOpen(frame, targetSize)
	frame.Size = UDim2.new(targetSize.X.Scale, targetSize.X.Offset, 0, 0)
	frame.Visible = true
	slowTween(frame, {Size = targetSize})
end

local function collapse(frame, targetWidth)
	local tw = tween(frame, TweenInfo.new(CONFIG.ANIM_MED, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
		Size = UDim2.new(0, targetWidth, 0, 0)
	})
	return tw
end

local function shake(frame)
	local base = frame.Position
	local seq = {
		UDim2.new(base.X.Scale, base.X.Offset - 8, base.Y.Scale, base.Y.Offset),
		UDim2.new(base.X.Scale, base.X.Offset + 8, base.Y.Scale, base.Y.Offset),
		UDim2.new(base.X.Scale, base.X.Offset - 6, base.Y.Scale, base.Y.Offset),
		UDim2.new(base.X.Scale, base.X.Offset + 6, base.Y.Scale, base.Y.Offset),
		UDim2.new(base.X.Scale, base.X.Offset - 3, base.Y.Scale, base.Y.Offset),
		base,
	}

	local delayAmount = 0
	for _, pos in ipairs(seq) do
		task.delay(delayAmount, function()
			if frame and frame.Parent then
				tween(frame, TweenInfo.new(0.04, Enum.EasingStyle.Linear), {Position = pos})
			end
		end)
		delayAmount += 0.04
	end
end

local function hoverButton(button, normalColor, hoverColor, shine)
	button.MouseEnter:Connect(function()
		medTween(button, {BackgroundColor3 = hoverColor})
		if shine then
			tween(shine, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
				Position = UDim2.new(1, 12, 0, 0),
				BackgroundTransparency = 0.89
			})
		end
	end)

	button.MouseLeave:Connect(function()
		medTween(button, {BackgroundColor3 = normalColor})
		if shine then
			shine.Position = UDim2.new(0, -70, 0, 0)
			shine.BackgroundTransparency = 0.95
		end
	end)
end

local function makeDraggable(frame, handle)
	handle = handle or frame

	local dragging = false
	local dragStart
	local startPos
	local currentTarget = frame.Position
	local currentVisual = frame.Position

	handle.InputBegan:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
			dragging = true
			dragStart = input.Position
			startPos = currentTarget

			input.Changed:Connect(function()
				if input.UserInputState == Enum.UserInputState.End then
					dragging = false
				end
			end)
		end
	end)

	UserInputService.InputChanged:Connect(function(input)
		if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
			local delta = input.Position - dragStart
			currentTarget = UDim2.new(
				startPos.X.Scale, startPos.X.Offset + delta.X,
				startPos.Y.Scale, startPos.Y.Offset + delta.Y
			)
		end
	end)

	RunService.RenderStepped:Connect(function(dt)
		local alpha = math.clamp(dt * 20, 0, 1)
		currentVisual = currentVisual:Lerp(currentTarget, alpha)
		frame.Position = currentVisual
	end)
end

local function getCharacter()
	return LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
end

local function getHumanoidAndRoot()
	local character = getCharacter()
	local humanoid = character:FindFirstChildOfClass("Humanoid") or character:WaitForChild("Humanoid")
	local root = character:FindFirstChild("HumanoidRootPart") or character:WaitForChild("HumanoidRootPart")
	return humanoid, root
end

local function formatStatus(label, text, color)
	label.Text = text
	label.TextColor3 = color
	label.TextTransparency = 1
	tween(label, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
		TextTransparency = 0
	})
end

local function fadeStatus(label, delayTime)
	task.delay(delayTime or 1.5, function()
		if label and label.Parent then
			tween(label, TweenInfo.new(0.22, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
				TextTransparency = 1
			})
		end
	end)
end

local function findNearestPartByName(name)
	local _, root = getHumanoidAndRoot()
	local nearest = nil
	local nearestDistance = math.huge

	for _, obj in ipairs(workspace:GetDescendants()) do
		if obj:IsA("BasePart") and obj.Name == name then
			local distance = (obj.Position - root.Position).Magnitude
			if distance < nearestDistance then
				nearestDistance = distance
				nearest = obj
			end
		end
	end

	return nearest, nearestDistance
end

local function teleportToNearest(name)
	local _, root = getHumanoidAndRoot()
	local part = findNearestPartByName(name)
	if part then
		root.CFrame = part.CFrame + Vector3.new(0, 3, 0)
		return true
	end
	return false
end

--==================================================
-- EFFECTS
--==================================================
local blur = Lighting:FindFirstChild("X3R_DulesBlur")
if not blur then
	blur = Instance.new("BlurEffect")
	blur.Name = "X3R_DulesBlur"
	blur.Size = 0
	blur.Parent = Lighting
else
	blur.Size = 0
end

--==================================================
-- GUI ROOT
--==================================================
local gui = create("ScreenGui", {
	Name = "X3R_DULES_ADVANCED",
	ResetOnSpawn = false,
	IgnoreGuiInset = false,
	ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
	Parent = PlayerGui
})

--==================================================
-- KEY WINDOW
--==================================================
local keyFrame = create("Frame", {
	Name = "KeyFrame",
	AnchorPoint = Vector2.new(0.5, 0.5),
	Position = UDim2.fromScale(0.5, 0.5),
	Size = CONFIG.KEY_CLOSED_SIZE,
	BackgroundColor3 = COLORS.PANEL,
	BorderSizePixel = 0,
	ClipsDescendants = true,
	Parent = gui
})
makeCorner(keyFrame, UDim.new(0, 18))
makeStroke(keyFrame, COLORS.RED, 1.8, 0)

local keyGlow = create("Frame", {
	Name = "KeyGlow",
	BackgroundColor3 = COLORS.RED,
	BackgroundTransparency = 0.90,
	BorderSizePixel = 0,
	Position = UDim2.new(0, -10, 0, -10),
	Size = UDim2.new(1, 20, 1, 20),
	Parent = keyFrame
})
makeCorner(keyGlow, UDim.new(0, 22))

local keyTopBar = create("Frame", {
	Name = "TopBar",
	BackgroundColor3 = COLORS.BG2,
	BorderSizePixel = 0,
	Size = UDim2.new(1, 0, 0, 42),
	Parent = keyFrame
})
makeCorner(keyTopBar, UDim.new(0, 18))

local keyTopFix = create("Frame", {
	BackgroundColor3 = COLORS.BG2,
	BorderSizePixel = 0,
	Position = UDim2.new(0, 0, 0, 20),
	Size = UDim2.new(1, 0, 0, 22),
	Parent = keyTopBar
})

local keyBrand = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 14, 0, 0),
	Size = UDim2.new(1, -20, 1, 0),
	Text = "X3R • ACCESS",
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBold,
	TextSize = 15,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = keyTopBar
})

local keyContent = create("Frame", {
	Name = "Content",
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 16, 0, 52),
	Size = UDim2.new(1, -32, 1, -64),
	Parent = keyFrame
})

local keyTitle = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 0, 0, 0),
	Size = UDim2.new(1, 0, 0, 34),
	Text = "ENTER KEY",
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBlack,
	TextSize = 28,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = keyContent
})

local keySubtitle = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 0, 0, 30),
	Size = UDim2.new(1, 0, 0, 20),
	Text = "Unlock advanced local panel",
	TextColor3 = COLORS.GRAY,
	Font = Enum.Font.Gotham,
	TextSize = 13,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = keyContent
})

local keyInputFrame = create("Frame", {
	BackgroundColor3 = COLORS.BG2,
	BorderSizePixel = 0,
	Position = UDim2.new(0, 0, 0, 74),
	Size = UDim2.new(1, 0, 0, 48),
	Parent = keyContent
})
makeCorner(keyInputFrame, UDim.new(0, 12))
makeStroke(keyInputFrame, COLORS.RED3, 1.2, 0)

local keyIcon = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 12, 0, 0),
	Size = UDim2.new(0, 28, 1, 0),
	Text = "🔑",
	TextScaled = false,
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBold,
	TextSize = 18,
	Parent = keyInputFrame
})

local keyBox = create("TextBox", {
	Name = "KeyBox",
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 42, 0, 0),
	Size = UDim2.new(1, -52, 1, 0),
	PlaceholderText = "Type key here...",
	Text = "",
	TextColor3 = COLORS.WHITE,
	PlaceholderColor3 = COLORS.DARKGRAY,
	Font = Enum.Font.Gotham,
	TextSize = 16,
	ClearTextOnFocus = false,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = keyInputFrame
})

local confirmButton = create("TextButton", {
	Name = "ConfirmButton",
	BackgroundColor3 = COLORS.RED2,
	BorderSizePixel = 0,
	Position = UDim2.new(0, 0, 0, 132),
	Size = UDim2.new(1, 0, 0, 46),
	Text = "CONFIRM",
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBold,
	TextSize = 16,
	AutoButtonColor = false,
	Parent = keyContent
})
makeCorner(confirmButton, UDim.new(0, 12))
makeStroke(confirmButton, COLORS.RED, 1.4, 0)

local keyConfirmShine = create("Frame", {
	BackgroundColor3 = Color3.new(1, 1, 1),
	BackgroundTransparency = 0.95,
	BorderSizePixel = 0,
	Position = UDim2.new(0, -70, 0, 0),
	Size = UDim2.new(0, 60, 1, 0),
	Parent = confirmButton
})
makeCorner(keyConfirmShine, UDim.new(0, 12))
hoverButton(confirmButton, COLORS.RED2, Color3.fromRGB(180, 28, 28), keyConfirmShine)

local keyStatus = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 0, 1, -18),
	Size = UDim2.new(1, 0, 0, 18),
	Text = "",
	TextTransparency = 1,
	TextColor3 = COLORS.ERROR,
	Font = Enum.Font.GothamMedium,
	TextSize = 13,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = keyContent
})

--==================================================
-- MAIN WINDOW
--==================================================
local mainFrame = create("Frame", {
	Name = "MainFrame",
	AnchorPoint = Vector2.new(0.5, 0.5),
	Position = UDim2.fromScale(0.5, 0.5),
	Size = CONFIG.UI_CLOSED_SIZE,
	BackgroundColor3 = COLORS.PANEL,
	BorderSizePixel = 0,
	Visible = false,
	ClipsDescendants = true,
	Parent = gui
})
makeCorner(mainFrame, UDim.new(0, 18))
makeStroke(mainFrame, COLORS.RED, 1.8, 0)

local mainGlow = create("Frame", {
	Name = "MainGlow",
	BackgroundColor3 = COLORS.RED,
	BackgroundTransparency = 0.91,
	BorderSizePixel = 0,
	Position = UDim2.new(0, -12, 0, -12),
	Size = UDim2.new(1, 24, 1, 24),
	Parent = mainFrame
})
makeCorner(mainGlow, UDim.new(0, 24))

local topBar = create("Frame", {
	Name = "TopBar",
	BackgroundColor3 = COLORS.BG2,
	BorderSizePixel = 0,
	Size = UDim2.new(1, 0, 0, 42),
	Parent = mainFrame
})
makeCorner(topBar, UDim.new(0, 18))

local topBarFix = create("Frame", {
	BackgroundColor3 = COLORS.BG2,
	BorderSizePixel = 0,
	Position = UDim2.new(0, 0, 0, 20),
	Size = UDim2.new(1, 0, 0, 22),
	Parent = topBar
})

local brand = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 14, 0, 0),
	Size = UDim2.new(1, -90, 1, 0),
	Text = "X3R • DULES PANEL",
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBold,
	TextSize = 16,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = topBar
})

local closeButton = create("TextButton", {
	Name = "CloseButton",
	AnchorPoint = Vector2.new(1, 0.5),
	Position = UDim2.new(1, -10, 0.5, 0),
	Size = UDim2.new(0, 28, 0, 28),
	BackgroundColor3 = COLORS.RED3,
	BorderSizePixel = 0,
	Text = "×",
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBold,
	TextSize = 18,
	AutoButtonColor = false,
	Parent = topBar
})
makeCorner(closeButton, UDim.new(1, 0))
makeStroke(closeButton, COLORS.RED, 1.2, 0)
hoverButton(closeButton, COLORS.RED3, Color3.fromRGB(120, 22, 22))

local body = create("Frame", {
	Name = "Body",
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 12, 0, 54),
	Size = UDim2.new(1, -24, 1, -66),
	Parent = mainFrame
})

-- LEFT SIDEBAR
local sidebar = create("Frame", {
	Name = "Sidebar",
	BackgroundColor3 = COLORS.BG2,
	BorderSizePixel = 0,
	Position = UDim2.new(0, 0, 0, 0),
	Size = UDim2.new(0, 128, 1, 0),
	Parent = body
})
makeCorner(sidebar, UDim.new(0, 14))
makeStroke(sidebar, COLORS.RED3, 1.2, 0)

local sideTitle = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 12, 0, 10),
	Size = UDim2.new(1, -24, 0, 24),
	Text = "MENU",
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBold,
	TextSize = 14,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = sidebar
})

local sideSub = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 12, 0, 29),
	Size = UDim2.new(1, -24, 0, 18),
	Text = "Advanced local UI",
	TextColor3 = COLORS.GRAY,
	Font = Enum.Font.Gotham,
	TextSize = 11,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = sidebar
})

local tabsHolder = create("Frame", {
	Name = "TabsHolder",
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 8, 0, 58),
	Size = UDim2.new(1, -16, 1, -70),
	Parent = sidebar
})

local tabsLayout = create("UIListLayout", {
	Padding = UDim.new(0, 8),
	FillDirection = Enum.FillDirection.Vertical,
	HorizontalAlignment = Enum.HorizontalAlignment.Center,
	VerticalAlignment = Enum.VerticalAlignment.Top,
	Parent = tabsHolder
})

-- RIGHT CONTENT
local contentFrame = create("Frame", {
	Name = "ContentFrame",
	BackgroundColor3 = COLORS.PANEL2,
	BorderSizePixel = 0,
	Position = UDim2.new(0, 140, 0, 0),
	Size = UDim2.new(1, -140, 1, 0),
	Parent = body
})
makeCorner(contentFrame, UDim.new(0, 14))
makeStroke(contentFrame, COLORS.RED3, 1.2, 0)

local contentHeader = create("Frame", {
	Name = "Header",
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 16, 0, 10),
	Size = UDim2.new(1, -32, 0, 52),
	Parent = contentFrame
})

local contentTitle = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 0, 0, 0),
	Size = UDim2.new(1, 0, 0, 28),
	Text = "TRY BOTH !",
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBlack,
	TextSize = 28,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = contentHeader
})

local contentSub = create("TextLabel", {
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 0, 0, 28),
	Size = UDim2.new(1, 0, 0, 18),
	Text = "Teleport and speed controls",
	TextColor3 = COLORS.GRAY,
	Font = Enum.Font.Gotham,
	TextSize = 12,
	TextXAlignment = Enum.TextXAlignment.Left,
	Parent = contentHeader
})

local pageContainer = create("Frame", {
	Name = "PageContainer",
	BackgroundTransparency = 1,
	Position = UDim2.new(0, 16, 0, 70),
	Size = UDim2.new(1, -32, 1, -102),
	Parent = contentFrame
})

local statusBar = create("TextLabel", {
	Name = "StatusBar",
	BackgroundTransparency = 1,
	AnchorPoint = Vector2.new(0, 1),
	Position = UDim2.new(0, 16, 1, -10),
	Size = UDim2.new(1, -32, 0, 18),
	Text = "Ready",
	TextColor3 = COLORS.GRAY,
	Font = Enum.Font.GothamMedium,
	TextSize = 12,
	TextXAlignment = Enum.TextXAlignment.Left,
	TextTransparency = 0.15,
	Parent = contentFrame
})

--==================================================
-- FLOAT BUTTON
--==================================================
local openButton = create("TextButton", {
	Name = "OpenButton",
	Size = CONFIG.FLOAT_SIZE,
	Position = UDim2.new(0, 36, 0.62, 0),
	BackgroundColor3 = COLORS.RED2,
	BorderSizePixel = 0,
	Text = "X3R",
	TextColor3 = COLORS.WHITE,
	Font = Enum.Font.GothamBold,
	TextSize = 14,
	Visible = false,
	AutoButtonColor = false,
	Parent = gui
})
makeCorner(openButton, UDim.new(1, 0))
makeStroke(openButton, COLORS.RED, 1.5, 0)

local openGlow = create("Frame", {
	BackgroundColor3 = COLORS.RED,
	BackgroundTransparency = 0.91,
	BorderSizePixel = 0,
	Position = UDim2.new(0, -8, 0, -8),
	Size = UDim2.new(1, 16, 1, 16),
	Parent = openButton
})
makeCorner(openGlow, UDim.new(1, 0))

hoverButton(openButton, COLORS.RED2, Color3.fromRGB(182, 28, 28))
makeDraggable(openButton, openButton)

--==================================================
-- DRAG
--==================================================
makeDraggable(keyFrame, keyTopBar)
makeDraggable(mainFrame, topBar)

--==================================================
-- PAGES / TABS
--==================================================
local pages = {}

local function createPage(name)
	local page = create("Frame", {
		Name = name .. "Page",
		BackgroundTransparency = 1,
		Size = UDim2.new(1, 0, 1, 0),
		Visible = false,
		Parent = pageContainer
	})
	pages[name] = page
	return page
end

local actionsPage = createPage("Actions")
local infoPage = createPage("Info")

local function makeTabButton(text, iconText)
	local button = create("TextButton", {
		BackgroundColor3 = COLORS.PANEL3,
		BorderSizePixel = 0,
		Size = UDim2.new(1, 0, 0, 42),
		Text = "",
		AutoButtonColor = false,
		Parent = tabsHolder
	})
	makeCorner(button, UDim.new(0, 10))
	local stroke = makeStroke(button, COLORS.RED3, 1.2, 0)

	local icon = create("TextLabel", {
		BackgroundTransparency = 1,
		Position = UDim2.new(0, 10, 0, 0),
		Size = UDim2.new(0, 24, 1, 0),
		Text = iconText,
		TextColor3 = COLORS.WHITE,
		Font = Enum.Font.GothamBold,
		TextSize = 16,
		Parent = button
	})

	local label = create("TextLabel", {
		BackgroundTransparency = 1,
		Position = UDim2.new(0, 34, 0, 0),
		Size = UDim2.new(1, -40, 1, 0),
		Text = text,
		TextColor3 = COLORS.WHITE,
		Font = Enum.Font.GothamBold,
		TextSize = 13,
		TextXAlignment = Enum.TextXAlignment.Left,
		Parent = button
	})

	local shine = create("Frame", {
		BackgroundColor3 = Color3.new(1, 1, 1),
		BackgroundTransparency = 0.95,
		BorderSizePixel = 0,
		Position = UDim2.new(0, -60, 0, 0),
		Size = UDim2.new(0, 48, 1, 0),
		Parent = button
	})
	makeCorner(shine, UDim.new(0, 10))

	return button, stroke, shine
end

local actionsTab, actionsTabStroke, actionsShine = makeTabButton("Actions", "⚡")
local infoTab, infoTabStroke, infoShine = makeTabButton("Info", "ℹ")

hoverButton(actionsTab, COLORS.PANEL3, Color3.fromRGB(38, 22, 22), actionsShine)
hoverButton(infoTab, COLORS.PANEL3, Color3.fromRGB(38, 22, 22), infoShine)

local function setTabStyle(button, strokeObj, active)
	if active then
		button.BackgroundColor3 = Color3.fromRGB(46, 20, 20)
		strokeObj.Color = COLORS.RED
		strokeObj.Thickness = 1.5
	else
		button.BackgroundColor3 = COLORS.PANEL3
		strokeObj.Color = COLORS.RED3
		strokeObj.Thickness = 1.2
	end
end

local function switchTab(tabName)
	currentTab = tabName

	for name, page in pairs(pages) do
		page.Visible = (name == tabName)
	end

	setTabStyle(actionsTab, actionsTabStroke, tabName == "Actions")
	setTabStyle(infoTab, infoTabStroke, tabName == "Info")

	if tabName == "Actions" then
		contentTitle.Text = "TRY BOTH !"
		contentSub.Text = "Teleport and speed controls"
	else
		contentTitle.Text = "PANEL INFO"
		contentSub.Text = "Quick notes about the current panel"
	end
end

--==================================================
-- ACTIONS PAGE
--==================================================
local actionsLayout = create("UIListLayout", {
	Padding = UDim.new(0, 12),
	FillDirection = Enum.FillDirection.Vertical,
	HorizontalAlignment = Enum.HorizontalAlignment.Center,
	VerticalAlignment = Enum.VerticalAlignment.Top,
	Parent = actionsPage
})

local function makeActionCard(iconText, titleText, descText, buttonText)
	local card = create("Frame", {
		BackgroundColor3 = COLORS.BG2,
		BorderSizePixel = 0,
		Size = UDim2.new(1, 0, 0, 66),
		Parent = actionsPage
	})
	makeCorner(card, UDim.new(0, 12))
	makeStroke(card, COLORS.RED3, 1.2, 0)

	local iconBox = create("Frame", {
		BackgroundColor3 = Color3.fromRGB(40, 16, 16),
		BorderSizePixel = 0,
		Position = UDim2.new(0, 10, 0.5, -18),
		Size = UDim2.new(0, 36, 0, 36),
		Parent = card
	})
	makeCorner(iconBox, UDim.new(0, 10))
	makeStroke(iconBox, COLORS.RED, 1.0, 0)

	local iconLabel = create("TextLabel", {
		BackgroundTransparency = 1,
		Size = UDim2.fromScale(1, 1),
		Text = iconText,
		TextColor3 = COLORS.WHITE,
		Font = Enum.Font.GothamBold,
		TextSize = 18,
		Parent = iconBox
	})

	local title = create("TextLabel", {
		BackgroundTransparency = 1,
		Position = UDim2.new(0, 56, 0, 10),
		Size = UDim2.new(1, -166, 0, 20),
		Text = titleText,
		TextColor3 = COLORS.WHITE,
		Font = Enum.Font.GothamBold,
		TextSize = 15,
		TextXAlignment = Enum.TextXAlignment.Left,
		Parent = card
	})

	local desc = create("TextLabel", {
		BackgroundTransparency = 1,
		Position = UDim2.new(0, 56, 0, 30),
		Size = UDim2.new(1, -166, 0, 18),
		Text = descText,
		TextColor3 = COLORS.GRAY,
		Font = Enum.Font.Gotham,
		TextSize = 12,
		TextXAlignment = Enum.TextXAlignment.Left,
		Parent = card
	})

	local actionButton = create("TextButton", {
		BackgroundColor3 = COLORS.RED2,
		BorderSizePixel = 0,
		AnchorPoint = Vector2.new(1, 0.5),
		Position = UDim2.new(1, -10, 0.5, 0),
		Size = UDim2.new(0, 92, 0, 36),
		Text = buttonText,
		TextColor3 = COLORS.WHITE,
		Font = Enum.Font.GothamBold,
		TextSize = 13,
		AutoButtonColor = false,
		Parent = card
	})
	makeCorner(actionButton, UDim.new(0, 10))
	makeStroke(actionButton, COLORS.RED, 1.1, 0)

	local shine = create("Frame", {
		BackgroundColor3 = Color3.new(1, 1, 1),
		BackgroundTransparency = 0.95,
		BorderSizePixel = 0,
		Position = UDim2.new(0, -56, 0, 0),
		Size = UDim2.new(0, 42, 1, 0),
		Parent = actionButton
	})
	makeCorner(shine, UDim.new(0, 10))

	hoverButton(actionButton, COLORS.RED2, Color3.fromRGB(180, 28, 28), shine)

	return card, actionButton
end

local _, tpEndButton = makeActionCard("🏁", "TP EndPart", "Teleport to the nearest EndPart", "EXECUTE")
local _, tpStartButton = makeActionCard("🚩", "TP StartPart", "Teleport to the nearest StartPart", "EXECUTE")
local _, speedButton = makeActionCard("⚡", "SPEED", "Set Humanoid.WalkSpeed to 50", "EXECUTE")

--==================================================
-- INFO PAGE
--==================================================
local infoLayout = create("UIListLayout", {
	Padding = UDim.new(0, 12),
	FillDirection = Enum.FillDirection.Vertical,
	HorizontalAlignment = Enum.HorizontalAlignment.Center,
	VerticalAlignment = Enum.VerticalAlignment.Top,
	Parent = infoPage
})

local function makeInfoBox(titleText, descText)
	local box = create("Frame", {
		BackgroundColor3 = COLORS.BG2,
		BorderSizePixel = 0,
		Size = UDim2.new(1, 0, 0, 72),
		Parent = infoPage
	})
	makeCorner(box, UDim.new(0, 12))
	makeStroke(box, COLORS.RED3, 1.2, 0)

	local title = create("TextLabel", {
		BackgroundTransparency = 1,
		Position = UDim2.new(0, 12, 0, 10),
		Size = UDim2.new(1, -24, 0, 20),
		Text = titleText,
		TextColor3 = COLORS.WHITE,
		Font = Enum.Font.GothamBold,
		TextSize = 14,
		TextXAlignment = Enum.TextXAlignment.Left,
		Parent = box
	})

	local desc = create("TextLabel", {
		BackgroundTransparency = 1,
		Position = UDim2.new(0, 12, 0, 30),
		Size = UDim2.new(1, -24, 0, 30),
		TextWrapped = true,
		Text = descText,
		TextColor3 = COLORS.GRAY,
		Font = Enum.Font.Gotham,
		TextSize = 12,
		TextXAlignment = Enum.TextXAlignment.Left,
		TextYAlignment = Enum.TextYAlignment.Top,
		Parent = box
	})

	return box
end

makeInfoBox("KEY", "This panel unlocks only when the correct key is entered: DULES.")
makeInfoBox("TELEPORT", "Both teleport buttons search the entire workspace and move you to the nearest matching part name.")
makeInfoBox("SPEED", "The speed button only changes your local Humanoid WalkSpeed to 50.")

--==================================================
-- OPEN/CLOSE
--==================================================
local function openMain()
	uiOpen = true
	openButton.Visible = false
	mainFrame.Visible = true
	mainFrame.Size = CONFIG.UI_CLOSED_SIZE
	blur.Size = 0

	tween(blur, TweenInfo.new(0.22, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
		Size = CONFIG.BLUR_SIZE
	})

	tween(mainFrame, TweenInfo.new(0.28, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
		Size = CONFIG.UI_SIZE
	})
end

local function closeMain()
	uiOpen = false

	tween(blur, TweenInfo.new(0.18, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
		Size = 0
	})

	local tw = tween(mainFrame, TweenInfo.new(0.20, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
		Size = CONFIG.UI_CLOSED_SIZE
	})

	tw.Completed:Connect(function()
		if not uiOpen then
			mainFrame.Visible = false
			openButton.Visible = true
		end
	end)
end

local function unlockPanel()
	unlocked = true

	formatStatus(keyStatus, "Access granted", COLORS.SUCCESS)
	fadeStatus(keyStatus, 0.9)

	local hide = tween(keyFrame, TweenInfo.new(0.22, Enum.EasingStyle.Back, Enum.EasingDirection.In), {
		Size = CONFIG.KEY_CLOSED_SIZE
	})

	hide.Completed:Connect(function()
		keyFrame.Visible = false
		openMain()
	end)
end

--==================================================
-- KEY CHECK
--==================================================
local function handleKeyCheck()
	pulse(confirmButton)

	local entered = tostring(keyBox.Text or ""):upper()
	if entered == CONFIG.KEY then
		unlockPanel()
	else
		formatStatus(keyStatus, "Wrong key", COLORS.ERROR)
		fadeStatus(keyStatus, 1.5)
		shake(keyFrame)
	end
end

confirmButton.MouseButton1Click:Connect(handleKeyCheck)
keyBox.FocusLost:Connect(function(enterPressed)
	if enterPressed then
		handleKeyCheck()
	end
end)

--==================================================
-- BUTTON LOGIC
--==================================================
tpEndButton.MouseButton1Click:Connect(function()
	pulse(tpEndButton)

	local ok = teleportToNearest("EndPart")
	if ok then
		statusBar.Text = "Teleported to nearest EndPart"
		statusBar.TextColor3 = COLORS.SUCCESS
	else
		statusBar.Text = "No EndPart found"
		statusBar.TextColor3 = COLORS.ERROR
	end
end)

tpStartButton.MouseButton1Click:Connect(function()
	pulse(tpStartButton)

	local ok = teleportToNearest("StartPart")
	if ok then
		statusBar.Text = "Teleported to nearest StartPart"
		statusBar.TextColor3 = COLORS.SUCCESS
	else
		statusBar.Text = "No StartPart found"
		statusBar.TextColor3 = COLORS.ERROR
	end
end)

speedButton.MouseButton1Click:Connect(function()
	pulse(speedButton)

	local humanoid = getHumanoidAndRoot()
	if humanoid then
		humanoid.WalkSpeed = CONFIG.WALKSPEED
		currentWalkspeedBoosted = true
		statusBar.Text = "WalkSpeed set to 50"
		statusBar.TextColor3 = COLORS.SUCCESS
	end
end)

closeButton.MouseButton1Click:Connect(function()
	pulse(closeButton)
	closeMain()
end)

openButton.MouseButton1Click:Connect(function()
	pulse(openButton)
	openMain()
end)

actionsTab.MouseButton1Click:Connect(function()
	pulse(actionsTab)
	switchTab("Actions")
end)

infoTab.MouseButton1Click:Connect(function()
	pulse(infoTab)
	switchTab("Info")
end)

--==================================================
-- GLOW ANIMATION
--==================================================
task.spawn(function()
	while gui.Parent do
		tween(mainGlow, TweenInfo.new(1.8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
			BackgroundTransparency = 0.94
		})
		tween(openGlow, TweenInfo.new(1.8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
			BackgroundTransparency = 0.94
		})
		tween(keyGlow, TweenInfo.new(1.8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
			BackgroundTransparency = 0.93
		})
		task.wait(1.8)

		tween(mainGlow, TweenInfo.new(1.8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
			BackgroundTransparency = 0.89
		})
		tween(openGlow, TweenInfo.new(1.8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
			BackgroundTransparency = 0.89
		})
		tween(keyGlow, TweenInfo.new(1.8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
			BackgroundTransparency = 0.88
		})
		task.wait(1.8)
	end
end)

--==================================================
-- RESPAWN SUPPORT
--==================================================
LocalPlayer.CharacterAdded:Connect(function()
	task.wait(0.4)
	if currentWalkspeedBoosted then
		local humanoid = getHumanoidAndRoot()
		if humanoid then
			humanoid.WalkSpeed = CONFIG.WALKSPEED
		end
	end
end)

--==================================================
-- INITIALIZE
--==================================================
switchTab("Actions")
keyFrame.Visible = true
mainFrame.Visible = false
openButton.Visible = false
statusBar.Text = "Ready"
statusBar.TextColor3 = COLORS.GRAY

popOpen(keyFrame, CONFIG.KEY_SIZE)

Features & Information

key is dules and u can see the script !
#roblox#slap dules#slap#dules#tp

Community Comments (0)

No comments yet for this script.

More Scripts for Slap DUELS [🎉UPD!]