// Name: Roblox Smooth Fly Script
// Description: Generates a smooth flight LocalScript for Roblox Studio and copies it to the clipboard.
// Author: atimegamer1-spec
// GitHub: atimegamer1-spec
import "@johnlindquist/kit"
const [toggleKeyInput, baseSpeedStr, sprintMultStr, accelStr] = await fields([
{ label: "Toggle key (e.g., F)", placeholder: "F", value: "F", required: true },
{ label: "Base speed (studs/sec)", placeholder: "50", value: "50", type: "number" },
{ label: "Sprint multiplier (Shift)", placeholder: "2", value: "2", type: "number" },
{ label: "Smoothing (higher = snappier)", placeholder: "8", value: "8", type: "number" },
])
const keySanitize = (s: string) => {
const t = (s || "F").trim()
if (t.length === 1) {
const ch = t.toUpperCase()
// Letters or digits map directly in Enum.KeyCode
if ((ch >= "A" && ch <= "Z") || (ch >= "0" && ch <= "9")) return ch
}