Universal Script 📌
12 Views
51 Executions

Klavyesiz kontroller

Universal Script 📌Uploaded by
1 month ago
Please login to perform these actions:

Description

local VirtualInputManager = game:GetService("VirtualInputManager") local CoreGui = game:GetService("CoreGui") local Players = game:GetService("Players") local localPlayer = Players.LocalPlayer -- Eski ekran varsa temizle if CoreGui:FindFirstChild("VirtualCarKeyboardUI") then CoreGui.VirtualCarKeyboardUI:Destroy() end -- ScreenGui Oluşturma local gui = Instance.new("ScreenGui") gui.Name = "VirtualCarKeyboardUI" gui.ResetOnSpawn = false local success, _ = pcall(function() gui.Parent = CoreGui end) if not success then gui.Parent = localPlayer:WaitForChild("PlayerGui") end -- Buton Oluşturma Fonksiyonu local function createButton(name, text, pos, size) local btn = Instance.new("TextButton") btn.Name = name btn.Text = text btn.Size = size btn.Position = pos btn.BackgroundColor3 = Color3.fromRGB(25, 25, 25) btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.TextScaled = true btn.Font = Enum.Font.SourceSansBold btn.BackgroundTransparency = 0.25 btn.Parent = gui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 12) corner.Parent = btn return btn end -- Ekran Tuşları (Sağ Taraf: İleri W / Geri S | Sol Taraf: Sol A / Sağ D) local btnW = createButton("BtnW", "GAZ (W) ⬆", UDim2.new(0.82, 0, 0.55, 0), UDim2.new(0.13, 0, 0.18, 0)) local btnS = createButton("BtnS", "FREN (S) ⬇", UDim2.new(0.82, 0, 0.76, 0), UDim2.new(0.13, 0, 0.18, 0)) local btnA = createButton("BtnA", "SOL (A) ⬅", UDim2.new(0.04, 0, 0.65, 0), UDim2.new(0.13, 0, 0.18, 0)) local btnD = createButton("BtnD", "SAĞ (D) ➡", UDim2.new(0.18, 0, 0.65, 0), UDim2.new(0.13, 0, 0.18, 0)) -- Gerçek Klavye Tuş Sinyali Gönderme Fonksiyonu local function bindVirtualKey(button, keyCode) button.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then button.BackgroundColor3 = Color3.fromRGB(0, 170, 255) -- Bilgisayardaki tuşa basma sinyali gönderir VirtualInputManager:SendKeyEvent(true, keyCode, false, game) end end) button.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then button.BackgroundColor3 = Color3.fromRGB(25, 25, 25) -- Tuştan parmağı çekme sinyali gönderir VirtualInputManager:SendKeyEvent(false, keyCode, false, game) end end) end -- Tuşları Oyuna Bağlama (W, A, S, D) bindVirtualKey(btnW, Enum.KeyCode.W) bindVirtualKey(btnS, Enum.KeyCode.S) bindVirtualKey(btnA, Enum.KeyCode.A) bindVirtualKey(btnD, Enum.KeyCode.D)

View Raw
Edited By: handsncelik90 Download


Comments
0
No comments. Please Login to add a comment.