--[[
DEAN FLY SYSTEM - CUSTOM KEYBIND
- Insert: Menüyü açar/kapatır.
- Keybind: Menü üzerinden uçuş tuşunu atayabilirsin.
- Kontroller: W,A,S,D ile yön ver, Space ile yüksel, Shift ile alçal.
]]
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local localPlayer = Players.LocalPlayer
-- TEMİZLİK
if localPlayer.PlayerGui:FindFirstChild("DeanFlyMenu") then localPlayer.PlayerGui.DeanFlyMenu:Destroy() end
local flyConfig = {
active = false,
speed = 50,
bind = Enum.KeyCode.F, -- Varsayılan tuş F
waitingForBind = false
}
-- --- FLY LOGIC ---
local bodyVelocity, bodyGyro
RunService.RenderStepped:Connect(function()
local char = localPlayer.Character
local root = char and char:FindFirstChild("HumanoidRootPart")
if flyConfig.active and root then
if not bodyVelocity then
bodyVelocity = Instance.new("BodyVelocity", root)
bodyVelocity.MaxForce = Vector3.new(1,1,1) * 10^6
bodyGyro = Instance.new("BodyGyro", root)
bodyGyro.MaxTorque = Vector3.new(1,1,1) * 10^6
bodyGyro.D = 100
end
bodyGyro.CFrame = workspace.CurrentCamera.CFrame
local moveDir = Vector3.new(0,0,0)
if UIS:IsKeyDown(Enum.KeyCode.W) then moveDir = moveDir + workspace.CurrentCamera.CFrame.LookVector end
if UIS:IsKeyDown(Enum.KeyCode.S) then moveDir = moveDir - workspace.CurrentCamera.CFrame.LookVector end
if UIS:IsKeyDown(Enum.KeyCode.A) then moveDir = moveDir - workspace.CurrentCamera.CFrame.RightVector end
if UIS:IsKeyDown(Enum.KeyCode.D) then moveDir = moveDir + workspace.CurrentCamera.CFrame.RightVector end
if UIS:IsKeyDown(Enum.KeyCode.Space) then moveDir = moveDir + Vector3.new(0,1,0) end
if UIS:IsKeyDown(Enum.KeyCode.LeftShift) then moveDir = moveDir - Vector3.new(0,1,0) end
bodyVelocity.Velocity = moveDir * flyConfig.speed
else
if bodyVelocity then bodyVelocity:Destroy() bodyVelocity = nil end
if bodyGyro then bodyGyro:Destroy() bodyGyro = nil end
end
end)
-- --- GUI TASARIMI ---
local ScreenGui = Instance.new("ScreenGui", localPlayer.PlayerGui)
ScreenGui.Name = "DeanFlyMenu"
ScreenGui.ResetOnSpawn = false
local Main = Instance.new("Frame", ScreenGui)
Main.Size = UDim2.new(0, 220, 0, 150)
Main.Position = UDim2.new(0.5, -110, 0.5, -75)
Main.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
Main.Active, Main.Draggable = true, true
Instance.new("UICorner", Main)
Instance.new("UIStroke", Main).Color = Color3.fromRGB(0, 255, 150)
local Title = Instance.new("TextLabel", Main)
Title.Size = UDim2.new(1, 0, 0, 40)
Title.Text = "DEAN FLY V1"
Title.TextColor3 = Color3.new(1,1,1)
Title.BackgroundTransparency = 1
Title.Font = Enum.Font.GothamBold
-- Tuş Atama Butonu
local BindBtn = Instance.new("TextButton", Main)
BindBtn.Size = UDim2.new(0, 180, 0, 35)
BindBtn.Position = UDim2.new(0.5, -90, 0, 50)
BindBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
BindBtn.Text = "FLY KEY: " .. flyConfig.bind.Name
BindBtn.TextColor3 = Color3.new(1,1,1)
Instance.new("UICorner", BindBtn)
BindBtn.MouseButton1Click:Connect(function()
flyConfig.waitingForBind = true
BindBtn.Text = "... PRESS ANY KEY ..."
end)
-- Aktif/Pasif Durum Yazısı
local Status = Instance.new("TextLabel", Main)
Status.Size = UDim2.new(1, 0, 0, 30)
Status.Position = UDim2.new(0, 0, 0, 100)
Status.Text = "STATUS: OFF"
Status.TextColor3 = Color3.new(1, 0, 0)
Status.BackgroundTransparency = 1
-- --- INPUT HANDLER ---
UIS.InputBegan:Connect(function(input, chat)
if chat then return end
if flyConfig.waitingForBind then
flyConfig.bind = input.KeyCode
BindBtn.Text = "FLY KEY: " .. input.KeyCode.Name
flyConfig.waitingForBind = false
elseif input.KeyCode == flyConfig.bind then
flyConfig.active = not flyConfig.active
Status.Text = "STATUS: " .. (flyConfig.active and "ON" or "OFF")
Status.TextColor3 = flyConfig.active and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
elseif input.KeyCode == Enum.KeyCode.Insert then
Main.Visible = not Main.Visible
end
end)
Comments
No comments yet
Be the first to share your thoughts!