
KeylessUniversal

-- DELTA MOBILE COMPATIBLE - SM64 MOVEMENT ENGINE (WALL KICK PURGED)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")
-- Default Physics Constants
local SM64_BASE_SPEED = 14
local SM64_MAX_SPEED = 30
local ACCELERATION_RATE = 0.55
local GROUND_FRICTION = 0.94
-- Core System Flags
local lastLandTime = 0
local jumpCombo = 0
local isZHeld = false
local wasAirborne = false
local moveState = "FREE" -- FREE, LONGJUMP, TRIPLEJUMP, DIVING, SLIDING, GROUNDPOUND
-- Enforce Delta-Safe Settings
workspace.Gravity = 195
humanoid.PlatformStand = false
humanoid.WalkSpeed = SM64_BASE_SPEED
humanoid.JumpPower = 50
-- --- DELTA HUD GENERATION (Z, B BUTTONS, SPEEDOMETER) ---
local screenGui = player:WaitForChild("PlayerGui"):FindFirstChild("SM64_DeltaHUD")
if screenGui then screenGui:Destroy() end
screenGui = Instance.new("ScreenGui")
screenGui.Name = "SM64_DeltaHUD"
screenGui.ResetOnSpawn = false
screenGui.Parent = player.PlayerGui
local hudContainer = Instance.new("Frame")
hudContainer.Size = UDim2.new(0, 220, 0, 260)
hudContainer.Position = UDim2.new(1, -260, 1, -280)
hudContainer.BackgroundTransparency = 1
hudContainer.Parent = screenGui
local speedometer = Instance.new("TextLabel")
speedometer.Name = "Speedometer"
speedometer.Size = UDim2.new(1, 0, 0, 40)
speedometer.BackgroundTransparency = 0.6
speedometer.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
speedometer.Text = "SPEED: 0 STUDS/S"
speedometer.TextColor3 = Color3.fromRGB(50, 255, 50)
speedometer.Font = Enum.Font.Code
speedometer.TextSize = 16
speedometer.Parent = hudContainer
local uiCornerHUD = Instance.new("UICorner")
uiCornerHUD.CornerRadius = UDim.new(0, 8)
uiCornerHUD.Parent = speedometer
local buttonContainer = Instance.new("Frame")
buttonContainer.Size = UDim2.new(1, 0, 1, -50)
buttonContainer.Position = UDim2.new(0, 0, 0, 50)
buttonContainer.BackgroundTransparency = 1
buttonContainer.Parent = hudContainer
local function createMobileButton(name, color, pos, text)
local btn = Instance.new("TextButton")
btn.Name = name
btn.Size = UDim2.new(0, 75, 0, 75)
btn.Position = pos
btn.BackgroundColor3 = color
btn.Text = text
btn.TextColor3 = Color3.fromRGB(255, 255, 255)
btn.Font = Enum.Font.SourceSansBold
btn.TextSize = 28
btn.Parent = buttonContainer
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(1, 0)
corner.Parent = btn
return btn
end
local btnZ = createMobileButton("Z_Button", Color3.fromRGB(100, 100, 100), UDim2.new(0, 10, 0, 100), "Z")
local btnB = createMobileButton("B_Button", Color3.fromRGB(200, 50, 50), UDim2.new(0, 110, 0, 30), "B")
-- --- CORE ENGINE TICK (MOMENTUM & COMBO LOCK PHYSICS) ---
RunService.PreSimulation:Connect(function()
if not rootPart or not humanoid or humanoid.Health <= 0 then return end
local moveDir = humanoid.MoveDirection
local lookVector = rootPart.CFrame.LookVector
local rawVelocity = rootPart.AssemblyLinearVelocity
local horizontalSpeed = Vector3.new(rawVelocity.X, 0, rawVelocity.Z).Magnitude
local currentState = humanoid:GetState()
local isGrounded = currentState ~= Enum.HumanoidStateType.Freefall and currentState ~= Enum.HumanoidStateType.Jumping
speedometer.Text = string.format("SPEED: %d STUDS/S", math.floor(horizontalSpeed))
-- --- JUMP VECTOR CHANGER MATRIX ---
if not isGrounded and not wasAirborne then
wasAirborne = true
local now = tick()
if now - lastLandTime < 0.55 then
jumpCombo = (jumpCombo % 3) + 1
else
jumpCombo = 1
end
if isZHeld and humanoid.WalkSpeed > 14 then
moveState = "LONGJUMP"
rootPart.AssemblyLinearVelocity = (lookVector * 78) + Vector3.new(0, 24, 0)
elseif isZHeld and moveDir:Dot(lookVector) < -0.2 then
moveState = "LONGJUMP"
rootPart.AssemblyLinearVelocity = (lookVector * -96) + Vector3.new(0, 20, 0)
elseif jumpCombo == 2 and humanoid.WalkSpeed > 16 then
moveState = "FREE"
rootPart.AssemblyLinearVelocity = Vector3.new(rawVelocity.X, 62, rawVelocity.Z)
elseif jumpCombo == 3 and humanoid.WalkSpeed > 20 then
moveState = "TRIPLEJUMP"
rootPart.AssemblyLinearVelocity = Vector3.new(rawVelocity.X * 1.25, 90, rawVelocity.Z * 1.25)
jumpCombo = 0
else
moveState = "FREE"
jumpCombo = 1
end
end
if isGrounded and wasAirborne then
lastLandTime = tick()
wasAirborne = false
if moveState == "DIVING" then
moveState = "SLIDING"
elseif moveState == "GROUNDPOUND" then
moveState = "FREE"
end
end
-- --- ACCELERATION MOMENTUM SYSTEM ---
if moveDir.Magnitude > 0 then
if isZHeld then
humanoid.WalkSpeed = 7
else
humanoid.WalkSpeed = math.min(humanoid.WalkSpeed + ACCELERATION_RATE, SM64_MAX_SPEED)
end
else
humanoid.WalkSpeed = SM64_BASE_SPEED
end
-- --- DYNAMIC N64 ANIMATION RUN SCALER ---
local animator = humanoid:FindFirstChildOfClass("Animator")
if animator then
for _, track in ipairs(animator:GetPlayingAnimationTracks()) do
if track.Name:lower():find("run") or track.Name:lower():find("walk") then
if moveDir.Magnitude > 0 then
local animSpeedRatio = humanoid.WalkSpeed / SM64_BASE_SPEED
track:AdjustSpeed(math.clamp(animSpeedRatio, 0.6, 2.3))
else
track:AdjustSpeed(1)
end
end
end
end
if moveState == "SLIDING" and isGrounded then
rootPart.AssemblyLinearVelocity = rawVelocity * GROUND_FRICTION
if rawVelocity.Magnitude < 5 then
moveState = "FREE"
end
end
end)
-- --- EXTRA ACTION HUD EXTENSIONS ---
btnB.MouseButton1Down:Connect(function()
if not rootPart or humanoid.Health <= 0 then return end
moveState = "DIVING"
local lookVector = rootPart.CFrame.LookVector
rootPart.AssemblyLinearVelocity = (lookVector * 64) + Vector3.new(0, 24, 0)
end)
btnZ.MouseButton1Down:Connect(function()
isZHeld = true
btnZ.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
local isAirborne = humanoid:GetState() == Enum.HumanoidStateType.Freefall
if isAirborne then
moveState = "GROUNDPOUND"
rootPart.AssemblyLinearVelocity = Vector3.new(0, 0, 0)
task.wait(0.15)
if moveState == "GROUNDPOUND" then
rootPart.AssemblyLinearVelocity = Vector3.new(0, -140, 0)
end
end
end)
btnZ.MouseButton1Up:Connect(function()
isZHeld = false
btnZ.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
end)
player.CharacterAdded:Connect(function(newChar)
character = newChar
humanoid = character:WaitForChild("Humanoid")
rootPart = character:WaitForChild("HumanoidRootPart")
workspace.Gravity = 195
humanoid.PlatformStand = false
humanoid.WalkSpeed = SM64_BASE_SPEED
humanoid.JumpPower = 50
moveState = "FREE"
isZHeld = false
jumpCombo = 0
wasAirborne = false
end)
print("mario pee pee")No comments yet for this script.



