Universal Script πŸ“Œ
6.9k Views
2.7k Executions

my first script LY GUI

Universal Script πŸ“Œ
c00lscripter
c00lscripterPublished 5
1 year 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

im not sure if it works sorry

View Raw
-- LocalScript: Place this in StarterPlayer > StarterPlayerScripts

-- SERVICES
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")

-- PLAYER
local player = Players.LocalPlayer

-- REMOTE SETUP
local remoteEvent = ReplicatedStorage:FindFirstChild("FE_GUI_Action") or Instance.new("RemoteEvent")
remoteEvent.Name = "FE_GUI_Action"
remoteEvent.Parent = ReplicatedStorage

-- SERVER HANDLER (Runs on server using BindableEvent simulation)
if RunService:IsServer() then
	local flyingPlayers = {}

	local function getRootPart(character)
		return character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Torso")
	end

	remoteEvent.OnServerEvent:Connect(function(player, action)
		local char = player.Character
		if not char then return end
		local root = getRootPart(char)
		if not root then return end

		if action == "TeleportToSpawn" then
			root.CFrame = CFrame.new(0, 10, 0)

		elseif action == "PrintHello" then
			print(player.Name .. " clicked Hello!")

		elseif action == "ToggleFly" then
			if flyingPlayers[player] then
				local bv = root:FindFirstChild("BodyVelocity")
				if bv then bv:Destroy() end


Comments

6
Log in to join the conversation. Login
BANGscripts's profile picture
BANGscripts1 year ago

This is made by AI πŸ˜”

2
lory_'s profile picture
lory_4 months ago

My pfp is me irl because of this

1
c00lscripter's profile picture
c00lscripterUploader1 year ago

whats wrong with being a regretevator fan dude

1
ScriptbloxTermedMe's profile picture
ScriptbloxTermedMe1 year ago

yeah ts is AI + they a regretevator fan πŸ˜”πŸ₯€

1
c00lscripter's profile picture
c00lscripterUploader1 year ago

thanks dude

1
defugoo's profile picture
defugoo1 year ago

good job !

1

Tags

More universal scripts

See all
Script hub
33.0k
298.1k
Bumped 27 minutes ago
Script hub
23.6k
5.2k
Bumped 27 minutes ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
174
527
Bumped 57 minutes ago
Universal Script πŸ“Œ
1.6k
30.2k
Bumped 58 minutes ago
Script hub
4.1M
558.5k
Bumped 1 hour ago
Key System

Script hub

Hall of Fame #3

Verified script badgeOverflow 35 Supported Games

Script hub
5.5k
28.9k
Bumped 2 hours ago
Key System
Script hub
14.0k
28.5k
Bumped 3 hours ago