Universal Script 📌
1.2k Views
1.8k Executions

A Basic Pc Controller for Mobile

Universal Script 📌
8 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Pc Experience

View Raw
--[[
    测试版 V2.9:UI 构造完全统一版
    - 修复:Jump 按钮改用与 WASD 相同的 Frame+TextLabel 构造
    - 保持:所有按钮字体比例 0.28
    - 保持:WASD 紧凑间距 (0.88),ShiftLock 功能
    - 位置:Jump 靠右 (0.88),Shift 位于右下
]]

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

local player = Players.LocalPlayer
local pGui = player:WaitForChild("PlayerGui")
local camera = workspace.CurrentCamera

-- 1. 屏蔽原生拉杆
RunService.Stepped:Connect(function()
    local touchGui = pGui:FindFirstChild("TouchGui")
    if touchGui then
        touchGui.Enabled = false
        local frame = touchGui:FindFirstChild("TouchControlFrame")
        if frame then frame.Position = UDim2.new(2, 0, 2, 0) end
    end
end)

-- 2. 清理旧 UI
if pGui:FindFirstChild("Beta_V2_9") then pGui.Beta_V2_9:Destroy() end

-- 3. 创建容器
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "Beta_V2_9"
ScreenGui.Parent = pGui
ScreenGui.ResetOnSpawn = false
ScreenGui.IgnoreGuiInset = true

-- 4. 参数设定
local screen = ScreenGui.AbsoluteSize
local btnSize = math.clamp(screen.X * 0.09, 70, 100) 


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Script hub
3.0M
18.5M
Bumped 3 hours ago

Script hub

Hall of Fame #1

KeylessVerified script badgeYARHM Hub KEYLESS 2026

Script hub
119.5k
193.9k
Bumped 8 hours ago
Key System
Script hub
180.9k
1.8M
Bumped 8 hours ago
Key System
Universal Script 📌
1.2k
2.6k
Bumped 9 hours ago
Script hub
60.2k
244.1k
Bumped 9 hours ago
Key System
Universal Script 📌
6.2k
53.5k
Bumped 11 hours ago