Universal Script 📌
103 Views
93 Executions

Lighting Lock Skybox Lock

Universal Script 📌
_JAI
_JAIPublished 10
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

Locks current lighting and skybox. Useful for games with different lighting per area. Best if locked on best lighting chosen. Script executed at first will lock. Re exec will unlock it, allow you to choose a time to execute and lock again.

View Raw
if getgenv().__SA_LightingLock_Running then
	local existing = getgenv().__SA_LightingLock_Running
	existing.token = existing.token + 1
	local myToken = existing.token

	if existing.Conn then pcall(function() existing.Conn:Disconnect() end) end
	if existing.SkyConn then pcall(function() existing.SkyConn:Disconnect() end) end
	existing.Conn = nil
	existing.SkyConn = nil
	getgenv().__SA_LightingLock_Running = nil

	local ok, StarterGui = pcall(game.GetService, game, "StarterGui")
	if ok then
		pcall(function()
			StarterGui:SetCore("SendNotification", {
				Title = "Lighting Lock",
				Text = "Unlocked",
				Duration = 1
			})
		end)
	end
	return
end

local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")
local StarterGui = game:GetService("StarterGui")

local LOCK_PROPS = {
	"Ambient", "OutdoorAmbient", "Brightness", "ClockTime",
	"ColorShift_Bottom", "ColorShift_Top", "EnvironmentDiffuseScale",
	"EnvironmentSpecularScale", "ExposureCompensation", "FogColor",
	"FogEnd", "FogStart", "GeographicLatitude", "GlobalShadows",
	"ShadowSoftness", "Technology"
}

local function notify(text)
	pcall(function()
		StarterGui:SetCore("SendNotification", {
			Title = "Lighting Lock",


Comments

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

Tags

More universal scripts

See all
Script hub
178.8k
1.7M
Bumped 4 hours ago
Key System
Universal Script 📌
9.1k
31.7k
Bumped 5 hours ago
Script hub
49.9k
12.4k
Bumped 6 hours ago
Key System
Paid
Script hub
5.5M
1.1M
Bumped 10 hours ago
Key System
Script hub
20.7k
4.0k
Bumped 11 hours ago
Key System
Paid
Universal Script 📌
750
221
Approved 17 hours ago
Universal Script 📌
654
2.7k
Approved 17 hours ago