
1.0k Views
1.2k Executions
A Basic Pc Controller for Mobile
Universal Script 📌 7 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Pc Experience
--[[
测试版 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
0Log in to join the conversation. Login
No comments yet. Be the first!








