Universal Script 📌
267 Views
2.0k Executions

invisibility

Universal Script 📌
ramazan1337
ramazan1337Published 5
4 months 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

YOU NEED TO PRESS G TO WORK

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

local player = Players.LocalPlayer
local invisible = false

local function setInvisible(state)
	local character = player.Character or player.CharacterAdded:Wait()

	for _, object in ipairs(character:GetDescendants()) do
		if object:IsA("BasePart") then
			object.LocalTransparencyModifier = state and 1 or 0
		elseif object:IsA("Decal") then
			object.Transparency = state and 1 or 0
		end
	end

	invisible = state
end

UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end

	if input.KeyCode == Enum.KeyCode.G then
		setInvisible(not invisible)
	end
end)

player.CharacterAdded:Connect(function()
	invisible = false
end)



Comments

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

More universal scripts

See all
Universal Script 📌
1.3M
591.3k
Bumped 58 minutes ago
Script hub
2.5k
19.4k
Bumped 2 hours ago
Universal Script 📌
250
104
Approved 3 hours ago
Universal Script 📌
60
268
Approved 4 hours ago
Universal Script 📌
81
50
Approved 4 hours ago
Script hub
98
226
Approved 5 hours ago
Key System