Universal Script 📌
124 Views
6.4k Executions

smooth fly

Universal Script 📌
scriptss123321
scriptss123321First script
4 days ago · Updated

Reviewed by QueueSherlockPaid revieweron How review works

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

Features: - Toggle flight on/off with a button or the F key - Fly in the direction your camera is facing - Mobile support with on-screen FLY, Up and Down buttons - Works with the default mobile joystick - Clean on/off state, resets automatically when your character respawns Controls: PC: F = toggle, WASD = move, Space = up, Left Ctrl = down Mobile: Tap FLY, use the joystick to move, hold the arrows to go up or down

View Raw
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local camera = workspace.CurrentCamera

local FLY_KEY = Enum.KeyCode.F
local SPEED = 60

local flying = false
local upHeld, downHeld = false, false
local bv, bg, conn

-- Movement vector for both keyboard (WASD) and mobile joystick
local controls = require(player:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls()

---------------------------------------------------------------------
-- GUI
---------------------------------------------------------------------
local gui = Instance.new("ScreenGui")
gui.Name = "FlyGui"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")

local function makeButton(text, size, pos)
	local b = Instance.new("TextButton")
	b.Size = size
	b.Position = pos
	b.Text = text
	b.TextScaled = true
	b.Font = Enum.Font.GothamBold
	b.TextColor3 = Color3.new(1, 1, 1)
	b.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
	b.BackgroundTransparency = 0.25
	b.AutoButtonColor = true
	b.Parent = gui

	local corner = Instance.new("UICorner")
	corner.CornerRadius = UDim.new(0, 12)


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Universal Script 📌
6.8k
318.5k
Bumped 2 hours ago
Script hub
29.2k
241.3k
Bumped 3 hours ago
Script hub
6.9k
101.2k
Bumped 4 hours ago

Script hub

SAGAZx Hub

Script hub
280.1k
189.5k
Bumped 4 hours ago
Key System
Script hub
360
475
Bumped 5 hours ago

Script hub

Blythe

Script hub
9.0k
56.5k
Bumped 6 hours ago
Key System