Universal Script 📌
3.2k Views
2.2k Executions

Freeze Script

Universal Script 📌
greenapple1812
greenapple1812First script
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

Freeze your humanoid

View Raw
-- LocalScript to create a button and freeze player movement

local player = game.Players.LocalPlayer
local PlayerGui = player:WaitForChild("PlayerGui")

-- Create the button UI
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Parent = PlayerGui

local freezeButton = Instance.new("TextButton")
freezeButton.Size = UDim2.new(0.2, 0, 0.1, 0)
freezeButton.Position = UDim2.new(0.4, 0, 0.8, 0)
freezeButton.Font = Enum.Font.SourceSansBold
freezeButton.TextColor3 = Color3.new(1, 1, 1) -- White
freezeButton.BackgroundColor3 = Color3.new(0, 0.5, 1) -- Blue
freezeButton.Text = "Freeze My Movement"
freezeButton.Parent = ScreenGui

-- A simple toggle variable
local isFrozen = false

-- Function to handle the button click
local function onButtonClicked()
	local character = player.Character or player.CharacterAdded:Wait()
	local humanoid = character:FindFirstChildOfClass("Humanoid")

	if humanoid then
		isFrozen = not isFrozen -- This flips 'true' to 'false' and 'false' to 'true'
		
		-- Use 'PlatformStand' to completely disable all movement
		humanoid.PlatformStand = isFrozen

		-- Update the button's text to show the current state
		if isFrozen then
			freezeButton.Text = "Unfreeze My Movement"
		else
			freezeButton.Text = "Freeze My Movement"
		end
	end
end


Comments

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

Tags

More universal scripts

See all
Script hub
58
3
3 hours ago
Key System

Script hub

NEW Script Hub

Script hub
274
247
18 hours ago
Universal Script 📌
19.4k
178.7k
Bumped 1 hour ago
Key System
Script hub
135
9
3 hours ago
Key System
Script hub
272.4k
143.3k
Bumped 2 hours ago
Key System
Script hub
182.3k
1.8M
Bumped 3 hours ago
Key System

Script hub

#18 this week

Verified script badgeAirflow HUB

Script hub
71.4k
235.0k
Bumped 3 hours ago
Key System
Script hub
269
16
4 hours ago