Universal Script 📌
1.0k Views
1.2k Executions

A Basic Pc Controller for Mobile

Universal Script 📌
7 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
1.6M
2.1M
Bumped 6 hours ago
Key System

Script hub

#12 this week

Verified script badgeSnowy Hub 500+ Games & 25600+ Features

Script hub
269.2k
120.2k
Bumped 6 hours ago
Key System
Script hub
171.3k
1.4M
Bumped 9 hours ago
Key System
Script hub
16.7k
3.2k
Bumped 11 hours ago
Key System
Paid
Script hub
17.4k
88.6k
Bumped 11 hours ago
Universal Script 📌
851
44
Approved 12 hours ago
Universal Script 📌
2.0M
4.5k
Bumped 12 hours ago