Universal Script 📌
95 Views
58 Executions

Lighting Lock Skybox Lock

Universal Script 📌
_JAI
_JAIPublished 10
3 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
Universal Script 📌
3.8k
184.5k
Bumped 4 hours ago
Script hub
417
41
5 hours ago
Universal Script 📌
28.6k
663.4k
Bumped 7 hours ago
Script hub
13.8k
2.7k
Bumped 9 hours ago
Key System
Paid
Script hub
263.7k
88.1k
Bumped 10 hours ago
Key System
Universal Script 📌
2.9k
9.5k
Bumped 10 hours ago
Universal Script 📌
669
38
Approved 10 hours ago
Universal Script 📌
711
43
Approved 10 hours ago