Playmegamarble Studios
Key RequiredUniversal

Playmegamarble Studios

Universal Scriptlalt2014lalt2014 902 views 568 executesUpdated Sep 30, 2026
Unrated
00
Lua Script•1056 lines (19218 chars)
--// PLAYMEGAMARBLE MENU
--// Put this LocalScript inside StarterGui

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer

--------------------------------------------------
-- SETTINGS
--------------------------------------------------

local walkSpeed = 16
local jumpPower = 50
local flySpeed = 60

local flying = false
local noclip = false
local espEnabled = false
local infiniteJump = false
local walkFling = false

local flyConnection
local noclipConnection

local espObjects = {}
local flingCooldown = {}

--------------------------------------------------
-- COLORS
--------------------------------------------------

local BLACK = Color3.fromRGB(0, 0, 0)
local DARK = Color3.fromRGB(10, 10, 10)
local RED = Color3.fromRGB(255, 0, 0)
local WHITE = Color3.fromRGB(255, 255, 255)

--------------------------------------------------
-- GUI
--------------------------------------------------

local gui = Instance.new("ScreenGui")
gui.Name = "PlaymegamarbleMenu"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")

--------------------------------------------------
-- MAIN MENU
--------------------------------------------------

local menu = Instance.new("Frame")
menu.Size = UDim2.new(0, 310, 0, 400)
menu.Position = UDim2.new(0.5, -155, 0.5, -200)
menu.BackgroundColor3 = BLACK
menu.BorderColor3 = RED
menu.BorderSizePixel = 2
menu.Parent = gui

local menuCorner = Instance.new("UICorner")
menuCorner.CornerRadius = UDim.new(0, 16)
menuCorner.Parent = menu

--------------------------------------------------
-- HELPER
--------------------------------------------------

local function style(object)

	object.BackgroundColor3 = DARK
	object.BorderColor3 = RED
	object.BorderSizePixel = 2
	object.TextColor3 = WHITE
	object.Font = Enum.Font.SourceSansBold

	local corner = Instance.new("UICorner")
	corner.CornerRadius = UDim.new(0, 10)
	corner.Parent = object

end

--------------------------------------------------
-- TITLE
--------------------------------------------------

local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, -60, 0, 45)
title.Position = UDim2.new(0, 10, 0, 5)
title.BackgroundTransparency = 1
title.Text = "PLAYMEGAMARBLE"
title.TextColor3 = WHITE
title.TextScaled = true
title.Font = Enum.Font.SourceSansBold
title.Parent = menu

--------------------------------------------------
-- MINIMIZE
--------------------------------------------------

local minimize = Instance.new("TextButton")
minimize.Size = UDim2.new(0, 40, 0, 35)
minimize.Position = UDim2.new(1, -50, 0, 10)
minimize.Text = "-"
minimize.TextScaled = true
minimize.Parent = menu

style(minimize)

--------------------------------------------------
-- REOPEN BUTTON
--------------------------------------------------

local reopen = Instance.new("TextButton")
reopen.Size = UDim2.new(0, 65, 0, 45)
reopen.Position = UDim2.new(0, 15, 0.5, -22)
reopen.Text = "MENU"
reopen.TextScaled = true
reopen.Visible = false
reopen.Parent = gui

style(reopen)

--------------------------------------------------
-- NAVIGATION
--------------------------------------------------

local navigation = Instance.new("Frame")
navigation.Size = UDim2.new(1, -20, 0, 42)
navigation.Position = UDim2.new(0, 10, 0, 55)
navigation.BackgroundTransparency = 1
navigation.Parent = menu

local function makeTab(text, position)

	local button = Instance.new("TextButton")

	button.Size = UDim2.new(1/3, -5, 1, 0)
	button.Position = position
	button.Text = text
	button.TextScaled = true
	button.Parent = navigation

	style(button)

	return button
end

local homeTab = makeTab(
	"HOME",
	UDim2.new(0, 0, 0, 0)
)

local miscTab = makeTab(
	"MISC",
	UDim2.new(1/3, 2.5, 0, 0)
)

local creditsTab = makeTab(
	"CREDITS",
	UDim2.new(2/3, 5, 0, 0)
)

--------------------------------------------------
-- PAGES
--------------------------------------------------

local function makePage()

	local page = Instance.new("Frame")

	page.Size = UDim2.new(1, -20, 1, -145)
	page.Position = UDim2.new(0, 10, 0, 105)
	page.BackgroundTransparency = 1
	page.Visible = false
	page.Parent = menu

	return page
end

local homePage = makePage()
local miscPage = makePage()
local creditsPage = makePage()

homePage.Visible = true

--------------------------------------------------
-- BUTTON CREATOR
--------------------------------------------------

local function makeButton(parent, text, y)

	local button = Instance.new("TextButton")

	button.Size = UDim2.new(0.85, 0, 0, 40)
	button.Position = UDim2.new(0.075, 0, 0, y)
	button.Text = text
	button.TextScaled = true
	button.Parent = parent

	style(button)

	return button
end

--------------------------------------------------
-- HOME
--------------------------------------------------

-- WalkSpeed

local speedLabel = Instance.new("TextLabel")
speedLabel.Size = UDim2.new(0.42, 0, 0, 40)
speedLabel.Position = UDim2.new(0.05, 0, 0, 10)
speedLabel.Text = "WalkSpeed"
speedLabel.TextColor3 = WHITE
speedLabel.TextScaled = true
speedLabel.Font = Enum.Font.SourceSansBold
speedLabel.BackgroundTransparency = 1
speedLabel.Parent = homePage

local speedBox = Instance.new("TextBox")
speedBox.Size = UDim2.new(0.35, 0, 0, 40)
speedBox.Position = UDim2.new(0.53, 0, 0, 10)
speedBox.Text = "16"
speedBox.TextScaled = true
speedBox.ClearTextOnFocus = false
speedBox.Parent = homePage

style(speedBox)

local speedButton =
	makeButton(homePage, "SET WALKSPEED", 60)

-- JumpPower

local jumpLabel = Instance.new("TextLabel")
jumpLabel.Size = UDim2.new(0.42, 0, 0, 40)
jumpLabel.Position = UDim2.new(0.05, 0, 0, 110)
jumpLabel.Text = "JumpPower"
jumpLabel.TextColor3 = WHITE
jumpLabel.TextScaled = true
jumpLabel.Font = Enum.Font.SourceSansBold
jumpLabel.BackgroundTransparency = 1
jumpLabel.Parent = homePage

local jumpBox = Instance.new("TextBox")
jumpBox.Size = UDim2.new(0.35, 0, 0, 40)
jumpBox.Position = UDim2.new(0.53, 0, 0, 110)
jumpBox.Text = "50"
jumpBox.TextScaled = true
jumpBox.ClearTextOnFocus = false
jumpBox.Parent = homePage

style(jumpBox)

local jumpButton =
	makeButton(homePage, "SET JUMPPOWER", 160)

-- Infinite Jump

local infiniteJumpButton =
	makeButton(homePage, "INFINITE JUMP: OFF", 215)

--------------------------------------------------
-- MISC
--------------------------------------------------

local flyButton =
	makeButton(miscPage, "FLY: OFF", 5)

local flySpeedLabel = Instance.new("TextLabel")
flySpeedLabel.Size = UDim2.new(0.42, 0, 0, 40)
flySpeedLabel.Position = UDim2.new(0.05, 0, 0, 55)
flySpeedLabel.Text = "Fly Speed"
flySpeedLabel.TextColor3 = WHITE
flySpeedLabel.TextScaled = true
flySpeedLabel.Font = Enum.Font.SourceSansBold
flySpeedLabel.BackgroundTransparency = 1
flySpeedLabel.Parent = miscPage

local flySpeedBox = Instance.new("TextBox")
flySpeedBox.Size = UDim2.new(0.35, 0, 0, 40)
flySpeedBox.Position = UDim2.new(0.53, 0, 0, 55)
flySpeedBox.Text = "60"
flySpeedBox.TextScaled = true
flySpeedBox.ClearTextOnFocus = false
flySpeedBox.Parent = miscPage

style(flySpeedBox)

local espButton =
	makeButton(miscPage, "ESP: OFF", 105)

local noclipButton =
	makeButton(miscPage, "NOCLIP: OFF", 155)

local flingButton =
	makeButton(miscPage, "WALK FLING: OFF", 205)

--------------------------------------------------
-- CREDITS
--------------------------------------------------

local creditsText = Instance.new("TextLabel")

creditsText.Size = UDim2.new(0.9, 0, 0.6, 0)
creditsText.Position = UDim2.new(0.05, 0, 0.15, 0)
creditsText.BackgroundTransparency = 1
creditsText.TextColor3 = RED
creditsText.TextScaled = true
creditsText.Font = Enum.Font.SourceSansBold
creditsText.TextWrapped = true
creditsText.Text =
	"Made by Playmegamarble\n\nwith the ideas"
creditsText.Parent = creditsPage

--------------------------------------------------
-- PAGE SWITCHING
--------------------------------------------------

local function showPage(page)

	homePage.Visible = false
	miscPage.Visible = false
	creditsPage.Visible = false

	page.Visible = true

end

homeTab.MouseButton1Click:Connect(function()
	showPage(homePage)
end)

miscTab.MouseButton1Click:Connect(function()
	showPage(miscPage)
end)

creditsTab.MouseButton1Click:Connect(function()
	showPage(creditsPage)
end)

--------------------------------------------------
-- MOVEMENT
--------------------------------------------------

local function applyMovement()

	local character = player.Character
	if not character then return end

	local humanoid =
		character:FindFirstChildOfClass("Humanoid")

	if humanoid then

		humanoid.WalkSpeed = walkSpeed
		humanoid.UseJumpPower = true
		humanoid.JumpPower = jumpPower

	end
end

speedButton.MouseButton1Click:Connect(function()

	local value = tonumber(speedBox.Text)

	if value then

		walkSpeed = math.clamp(value, 0, 250)
		speedBox.Text = tostring(walkSpeed)

		applyMovement()

	end
end)

jumpButton.MouseButton1Click:Connect(function()

	local value = tonumber(jumpBox.Text)

	if value then

		jumpPower = math.clamp(value, 0, 250)
		jumpBox.Text = tostring(jumpPower)

		applyMovement()

	end
end)

--------------------------------------------------
-- INFINITE JUMP
--------------------------------------------------

UserInputService.JumpRequest:Connect(function()

	if not infiniteJump then return end

	local character = player.Character
	if not character then return end

	local humanoid =
		character:FindFirstChildOfClass("Humanoid")

	if humanoid then
		humanoid:ChangeState(
			Enum.HumanoidStateType.Jumping
		)
	end

end)

infiniteJumpButton.MouseButton1Click:Connect(function()

	infiniteJump = not infiniteJump

	infiniteJumpButton.Text =
		"InFINITE JUMP: " ..
		(infiniteJump and "ON" or "OFF")

end)

--------------------------------------------------
-- FLY
-- LOOK DIRECTION + WASD / MOBILE JOYSTICK
--------------------------------------------------

local function stopFlying()

	flying = false
	flyButton.Text = "FLY: OFF"

	if flyConnection then

		flyConnection:Disconnect()
		flyConnection = nil

	end

	local character = player.Character

	if character then

		local humanoid =
			character:FindFirstChildOfClass("Humanoid")

		if humanoid then

			humanoid.PlatformStand = false
			humanoid.AutoRotate = true

		end
	end
end

local function startFlying()

	local character = player.Character
	if not character then return end

	local root =
		character:WaitForChild("HumanoidRootPart")

	local humanoid =
		character:WaitForChild("Humanoid")

	flying = true
	flyButton.Text = "FLY: ON"

	humanoid.PlatformStand = true
	humanoid.AutoRotate = false

	flyConnection =
		RunService.RenderStepped:Connect(function()

			if not flying or not root.Parent then

				stopFlying()
				return

			end

			local moveDirection =
				humanoid.MoveDirection

			if moveDirection.Magnitude > 0 then

				local camera =
					workspace.CurrentCamera

				local lookDirection =
					camera.CFrame.LookVector

				root.AssemblyLinearVelocity =
					lookDirection.Unit * flySpeed

				root.CFrame = CFrame.lookAt(
					root.Position,
					root.Position + lookDirection
				)

			else

				root.AssemblyLinearVelocity =
					Vector3.zero

			end

		end)
end

flyButton.MouseButton1Click:Connect(function()

	if flying then
		stopFlying()
	else
		startFlying()
	end

end)

flySpeedBox.FocusLost:Connect(function()

	local value = tonumber(flySpeedBox.Text)

	if value then

		flySpeed =
			math.clamp(value, 1, 250)

		flySpeedBox.Text =
			tostring(flySpeed)

	end

end)

--------------------------------------------------
-- ESP
--------------------------------------------------

local function getHealthColor(health, maxHealth)

	if health <= 0 then
		return Color3.fromRGB(180, 0, 255)

	end

	local percentage =
		health / maxHealth

	if percentage <= 0.25 then

		return Color3.fromRGB(255, 0, 0)

	elseif percentage <= 0.50 then

		return Color3.fromRGB(255, 255, 0)

	else

		return Color3.fromRGB(0, 255, 0)

	end
end

local function addESP(target)

	if target == player then return end

	local character =
		target.Character

	if not character then return end

	local humanoid =
		character:FindFirstChildOfClass("Humanoid")

	if not humanoid then return end

	if espObjects[target] then
		return
	end

	local highlight =
		Instance.new("Highlight")

	highlight.Adornee = character
	highlight.FillTransparency = 0.5
	highlight.OutlineTransparency = 0
	highlight.Parent = character

	local billboard =
		Instance.new("BillboardGui")

	billboard.Size =
		UDim2.new(0, 220, 0, 45)

	billboard.StudsOffset =
		Vector3.new(0, 3, 0)

	billboard.AlwaysOnTop = true
	billboard.Adornee = character
	billboard.Parent = character

	local label =
		Instance.new("TextLabel")

	label.Size =
		UDim2.new(1, 0, 1, 0)

	label.BackgroundTransparency = 1
	label.TextStrokeTransparency = 0
	label.TextScaled = true
	label.Font = Enum.Font.SourceSansBold
	label.Parent = billboard

	local function updateESP()

		local health =
			math.max(0, humanoid.Health)

		local maxHealth =
			humanoid.MaxHealth

		local color =
			getHealthColor(
				health,
				maxHealth
			)

		label.Text =
			target.Name ..
			" [" ..
			math.floor(health) ..
			"/" ..
			math.floor(maxHealth) ..
			"]"

		label.TextColor3 = color

		highlight.FillColor = color
		highlight.OutlineColor = RED

	end

	updateESP()

	local connection =
		humanoid.HealthChanged:Connect(
			updateESP
		)

	espObjects[target] = {

		highlight = highlight,
		billboard = billboard,
		connection = connection

	}

end

local function removeESP(target)

	local data =
		espObjects[target]

	if not data then return end

	if data.connection then
		data.connection:Disconnect()
	end

	if data.highlight then
		data.highlight:Destroy()
	end

	if data.billboard then
		data.billboard:Destroy()
	end

	espObjects[target] = nil

end

local function enableESP()

	espEnabled = true
	espButton.Text = "ESP: ON"

	for _, target in
		ipairs(Players:GetPlayers()) do

		addESP(target)

	end
end

local function disableESP()

	espEnabled = false
	espButton.Text = "ESP: OFF"

	for _, target in
		ipairs(Players:GetPlayers()) do

		removeESP(target)

	end
end

espButton.MouseButton1Click:Connect(function()

	if espEnabled then
		disableESP()
	else
		enableESP()
	end

end)

Players.PlayerAdded:Connect(function(target)

	target.CharacterAdded:Connect(function()

		if espEnabled then

			task.wait(0.5)
			addESP(target)

		end

	end)

end)

Players.PlayerRemoving:Connect(function(target)

	removeESP(target)

end)

--------------------------------------------------
-- NOCLIP
--------------------------------------------------

local function setNoclip(enabled)

	noclip = enabled

	noclipButton.Text =
		"NOCLIP: " ..
		(enabled and "ON" or "OFF")

	if noclipConnection then

		noclipConnection:Disconnect()
		noclipConnection = nil

	end

	if enabled then

		noclipConnection =
			RunService.Stepped:Connect(
				function()

					local character =
						player.Character

					if not character then
						return
					end

					for _, part in
						ipairs(
							character:GetDescendants()
						) do

						if part:IsA("BasePart") then
							part.CanCollide = false
						end

					end

				end
			)

	end
end

noclipButton.MouseButton1Click:Connect(function()

	setNoclip(not noclip)

end)

--------------------------------------------------
-- WALK FLING
--------------------------------------------------

local function flingTarget(target)

	if not walkFling then return end

	local character =
		target.Character

	if not character then return end

	local targetRoot =
		character:FindFirstChild(
			"HumanoidRootPart"
		)

	local myCharacter =
		player.Character

	if not myCharacter or not targetRoot then
		return
	end

	local myRoot =
		myCharacter:FindFirstChild(
			"HumanoidRootPart"
		)

	if not myRoot then return end

	if flingCooldown[target] then
		return
	end

	flingCooldown[target] = true

	local direction =
		targetRoot.Position -
		myRoot.Position

	if direction.Magnitude > 0 then

		direction =
			direction.Unit

		targetRoot.AssemblyLinearVelocity =
			direction * 100 +
			Vector3.new(0, 60, 0)

	end

	task.delay(0.5, function()

		flingCooldown[target] = nil

	end)

end

RunService.Heartbeat:Connect(function()

	if not walkFling then return end

	local character =
		player.Character

	if not character then return end

	local root =
		character:FindFirstChild(
			"HumanoidRootPart"
		)

	if not root then return end

	for _, target in
		ipairs(Players:GetPlayers()) do

		if target ~= player then

			local targetCharacter =
				target.Character

			if targetCharacter then

				local targetRoot =
					targetCharacter:FindFirstChild(
						"HumanoidRootPart"
					)

				if targetRoot then

					local distance =
						(
							root.Position -
							targetRoot.Position
						).Magnitude

					if distance <= 4 then
						flingTarget(target)
					end

				end
			end
		end
	end
end)

flingButton.MouseButton1Click:Connect(function()

	walkFling = not walkFling

	flingButton.Text =
		"WALK FLING: " ..
		(walkFling and "ON" or "OFF")

end)

--------------------------------------------------
-- MINIMIZE
--------------------------------------------------

minimize.MouseButton1Click:Connect(function()

	menu.Visible = false
	reopen.Visible = true

end)

reopen.MouseButton1Click:Connect(function()

	menu.Visible = true
	reopen.Visible = false

end)

--------------------------------------------------
-- DRAGGING
--------------------------------------------------

local dragging = false
local dragStart
local startPosition

title.Active = true

title.InputBegan:Connect(function(input)

	if input.UserInputType ==
		Enum.UserInputType.MouseButton1
		or input.UserInputType ==
		Enum.UserInputType.Touch then

		dragging = true

		dragStart =
			input.Position

		startPosition =
			menu.Position

		input.Changed:Connect(function()

			if input.UserInputState ==
				Enum.UserInputState.End then

				dragging = false

			end

		end)

	end
end)

UserInputService.InputChanged:Connect(function(input)

	if not dragging then return end

	if input.UserInputType ==
		Enum.UserInputType.MouseMovement
		or input.UserInputType ==
		Enum.UserInputType.Touch then

		local delta =
			input.Position -
			dragStart

		menu.Position =
			UDim2.new(
				startPosition.X.Scale,
				startPosition.X.Offset + delta.X,
				startPosition.Y.Scale,
				startPosition.Y.Offset + delta.Y
			)

	end
end)

--------------------------------------------------
-- RESPAWN
--------------------------------------------------

player.CharacterAdded:Connect(function()

	task.wait(0.5)

	applyMovement()

	if noclip then
		setNoclip(true)
	end

	if espEnabled then

		for _, target in
			ipairs(Players:GetPlayers()) do

			if target ~= player then
				addESP(target)
			end

		end

	end
end)

--------------------------------------------------
-- KEEP MOVEMENT
--------------------------------------------------

RunService.Heartbeat:Connect(function()

	local character =
		player.Character

	if not character then return end

	local humanoid =
		character:FindFirstChildOfClass(
			"Humanoid"
		)

	if humanoid then

		humanoid.WalkSpeed =
			walkSpeed

		humanoid.UseJumpPower = true

		humanoid.JumpPower =
			jumpPower

	end
end)

Features & Information

Noclip and other stuff

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts