Run it
Copy the script and paste it into your executor.
globalEnv = ()
(overrides)
context = {}
key,value (overrides {}) context[key]=value
(name)
ok,value=(.GetService,,name)
ok value
players=context.Players ()
player=context.LocalPlayer (players players.LocalPlayer)
config=context.spoofConfig {}
context.spoofConfig=config
context.Players,context.LocalPlayer=players,player
context.Workspace=context.Workspace
context.localOriginalUserId=context.localOriginalUserId (player player.UserId)
context.localOriginalName=context.localOriginalName (player player.Name)
context.origUserId=context.origUserId context.localOriginalUserId
context.localUserId=context.localUserId context.localOriginalUserId
context.origPlayerName=context.origPlayerName context.localOriginalName
context.origDisplayName=context.origDisplayName (player player.DisplayName) context.origPlayerName
context.origGetPlayerByUserId=context.origGetPlayerByUserId (players players.GetPlayerByUserId)
context.origGetAttribute=context.origGetAttribute (player player.GetAttribute)
context.clockFunc=context.clockFunc .clock
context.cfg=context.cfg {cacheTtl=}
context.beamRotationOffset=context.beamRotationOffset
context.prngState=context.prngState
context.tickCounter=context.tickCounter
_,key ({,,,,,,,,,,,,,,,,,,,,,,})
context[key]=context[key] {}
context.pingConfig=context.pingConfig {PingSpoof=,PingMode=,PingValue=}
context.stretchConfig=context.stretchConfig {x=,y=}
_,key ({,,,}) config[key]=config[key] {}
config._stopped=
YabujinDeobfuscated={Context=context,Required={},Alive=}
(key)
context[key]~= context[key]
globalEnv[key]~= globalEnv[key]
key== key== key== key==
key==
key== key== key==
(...)
name=key== key
(YabujinDeobfuscated[name],..name)(...)
key==
(userId,field)
user=context.yabujinUsers[userId] context.yabujinUsers[(userId)]
user user.spoofer user.spoofer[field]
runtimeEnv=({}, {__index=(_,key)
context[key]~= context[key]
globalEnv[key]
,__newindex=(_,key,value)context[key]=value })
(,runtimeEnv)
YabujinDeobfuscated.Required[]={,,}
setthreadidentity, , getthreadidentity = (), (), ()
YabujinDeobfuscated.runWithElevatedThreadIdentity = (b, ...)
setthreadidentity (b, ...)
J
(()
J = getthreadidentity (())
)
(setthreadidentity, )
N = .((b, ...))
N[] (N[]) == (N[]:(, , ))
A = {, , }
q, q (A)
(setthreadidentity, q)
N = .((b, ...))
N[]
(N[]) ~= N[]:(, , )
J ~=
(setthreadidentity, J)
.(N, , N.n)
YabujinDeobfuscated.Required[]={,,}
setthreadidentity, , spoofConfig = (), (), ()
YabujinDeobfuscated.runSafeQueueWorker = ()
spoofConfig._stopped
setthreadidentity
(setthreadidentity, )
#spoofConfig._safeQueue >
b = .(spoofConfig._safeQueue, )
b
spoofConfig.(b)
.()
YabujinDeobfuscated.Required[]={,,}
LocalPlayer, localOriginalUserId, spoofConfig = (), (), ()
YabujinDeobfuscated.getRealUserId = (b)
b == LocalPlayer localOriginalUserId
J = spoofConfig.RealUserIdMap
J J[b]
J[b]
(b) == (b:())
b.UserId
YabujinDeobfuscated.Required[]={,,}
LocalPlayer, localOriginalName, spoofConfig = (), (), ()
YabujinDeobfuscated.getOriginalPlayerName = (b)
b == LocalPlayer localOriginalName
J = spoofConfig.OtherPlayerOriginals
J J[b] J[b].Name
J[b].Name
b.Name
YabujinDeobfuscated.Required[]={,,,}
LocalPlayer, spoofConfig, getRealUserId, getYabujinSpoofField = (), (), (), ()
YabujinDeobfuscated.getSpoofedPlayerNames = (b)
b ,
b == LocalPlayer
spoofConfig.UsernameSpoof
,
J, N = spoofConfig.SpoofedName, spoofConfig.SpoofedDisplayName
A = J J ~= J
A, N N ~= N A
J = (b)
b = yabujinUsers[J] yabujinUsers[(J)]
b b.spoofer ((b.spoofer))
b = (J, )
b (b) ~=
,
J = b.name b.name ~= b.name
J, b.displayName b.displayName ~= b.displayName J
spoofConfig.AnonymousMode
spoofConfig.AnonName , spoofConfig.AnonDisplayName
,
YabujinDeobfuscated.Required[]={,,,,,}
spoofConfig, origPlayerName, LocalPlayer, , origDisplayName, origUserId = (), (), (), (), (), ()
YabujinDeobfuscated.applyLocalPlayerIdentitySpoof = ()
b =
spoofConfig.UsernameSpoof
J = spoofConfig.SpoofedName
b = J J ~= J origPlayerName
b = origPlayerName
J = b ~= LocalPlayer.Name
J
(()
N = spoofConfig._findPlayersFrame (spoofConfig.())
N
A = N:( .. LocalPlayer.Name)
A
A:()
)
(()
LocalPlayer.Name = b
)
spoofConfig.UsernameSpoof
b, N = spoofConfig.SpoofedDisplayName, spoofConfig.SpoofedName
b b ~=
(()
LocalPlayer.DisplayName = b
)
N N ~=
(()
LocalPlayer.DisplayName = N
)
(()
LocalPlayer.DisplayName = origDisplayName
)
(()
LocalPlayer.DisplayName = origDisplayName
)
J
(()
b = spoofConfig._findPlayersFrame (spoofConfig.())
b
J = b:( .. LocalPlayer.Name)
J
b = J:()
b
b.Text = LocalPlayer.DisplayName
)
spoofConfig.(()
spoofConfig.AvatarSpoof spoofConfig.AvatarUserId spoofConfig.AvatarUserId ~= LocalPlayer.UserId = spoofConfig.AvatarUserId
LocalPlayer.UserId = origUserId
)
YabujinDeobfuscated.Required[]={,,,}
spoofConfig, localOriginalUserId, origGetPlayerByUserId, localSpoofTargetId = (), (), (), ()
YabujinDeobfuscated.hookGetPlayerByUserId = (b, J)
spoofConfig.AvatarSpoof spoofConfig.AvatarUserId
(J) == (J == spoofConfig.AvatarUserId J == localOriginalUserId)
(b, localSpoofTargetId)
N = (b, J)
N (J) == spoofConfig.RealUserIdMap
A, q (spoofConfig.RealUserIdMap)
q == J
J = (b, A)
J
J
N
YabujinDeobfuscated.Required[]={,,,}
getRealUserId, getYabujinSpoofField, spoofConfig, origGetAttribute = (), (), (), ()
YabujinDeobfuscated.hookPlayerGetAttribute = (b, J)
(b) == (b:()) N = (b)
yabujinUsers[N] yabujinUsers[N].spoofer
J ==
A = (N, )
A
A
J ==
A = (N, )
A
A
J ==
A = (N, )
A
A
J ==
A = (N, )
A
A
J ==
A = (N, )
A (A) == A >
A ==
A ==
spoofConfig.AnonymousMode
N = (b)
(yabujinUsers[N] yabujinUsers[N].spoofer)
J == spoofConfig.AnonStreak
spoofConfig.AnonStreak
J == spoofConfig.AnonELO
spoofConfig.AnonELO
J == spoofConfig.AnonLevel
spoofConfig.AnonLevel
J ==
(b, J)
YabujinDeobfuscated.Required[]={,,,,}
LocalPlayer, getRealUserId, getSpoofedPlayerNames, spoofConfig, origNametagFunc = (), (), (), (), ()
YabujinDeobfuscated.hookNametagDisplayName = (b, J, N, A)
J J ~= LocalPlayer q = (J)
W = yabujinUsers[q] yabujinUsers[(q)]
W W.spoofer ((W.spoofer))
q, q = (J)
N = q q ~= q N
spoofConfig.AnonymousMode
(b, J, spoofConfig.AnonDisplayName , A)
(b, J, J == LocalPlayer spoofConfig.UsernameSpoof spoofConfig.SpoofedDisplayName ~= spoofConfig.SpoofedDisplayName (spoofConfig.SpoofedName ~= spoofConfig.SpoofedName J.DisplayName) N, A)
YabujinDeobfuscated.Required[]={,,,,,,,,,,,,,,,,,}
spooferActive, origDataGet, spoofConfig, rankedConfig, cachedSeasonsTable, cachedOrigSeasons, cachedSeasonsKey, equippedCosmeticsOverride, isCosmeticUnlocked, weaponUnlockMode, cachedWeaponInventory, specificUnlockedWeapons, ItemDatabase, favoritedWeaponsMap, WeaponConfig, favoritedCosmeticsOverride, equippedEmotesOverride, streakSpoofState = (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ()
YabujinDeobfuscated.hookClientDataGet = (b, J, ...)
spooferActive (b, J, ...)
spoofConfig.HideBeginnerTasks J ==
.huge
J ==
N = rankedConfig.forceRankedFakeElo spoofConfig._forceRankedSummaryElo ~=
spoofConfig.ELOSpoof spoofConfig.PassSpoof spoofConfig.PassLevelSpoof N
(b, J, ...)
A = (b, J, ...)
q = (spoofConfig.ELOSpoof) .. .. (spoofConfig.SpoofedELO ) .. .. (spoofConfig.SpoofedLeaderboardRank ) .. .. (rankedConfig.forceRankedFakeElo) .. .. (spoofConfig._forceRankedSummaryElo )
cachedSeasonsTable cachedOrigSeasons == A cachedSeasonsKey == q
cachedSeasonsTable
A
W = .(A)
U, L (W)
h, B, R = , N spoofConfig._forceRankedSummaryElo
spoofConfig.ELOSpoof spoofConfig.SpoofedELO
spoofConfig.SpoofedELO
B L.RankedPerformances
R = .(L)
s = .(L.RankedPerformances)
d, w (s)
u = .(w)
u.CurrentELO = B
N spoofConfig.SpoofedLeaderboardRank
u.CurrentLeaderboardRanking = spoofConfig.SpoofedLeaderboardRank
u.Metadata
w = .(u.Metadata)
w.FinalLeaderboardRank = spoofConfig.SpoofedLeaderboardRank
u.Metadata = w
N
u.CurrentLeaderboardRanking =
u.HighestELO u.HighestELO < B
u.HighestELO = B
s[d] = u
R.RankedPerformances = s
h =
R = L
(spoofConfig.PassSpoof spoofConfig.SpoofPassTrack spoofConfig.PassLevelSpoof spoofConfig.SpoofedPassLevel) L.BattlePass
R = R == L (.(L)) R
B = .(L.BattlePass)
spoofConfig.PassSpoof spoofConfig.SpoofPassTrack
spoofConfig.SpoofPassTrack ==
B.MaxPassTrackNum =
B.SeasonPassBundleOwned =
B.MaxPassTrackNum = spoofConfig.SpoofPassTrack
B.SeasonPassBundleOwned =
spoofConfig.PassLevelSpoof spoofConfig.SpoofedPassLevel
B.PassLevel = spoofConfig.SpoofedPassLevel
R.BattlePass = B
h =
h
W[U] = R
cachedSeasonsTable, cachedOrigSeasons, cachedSeasonsKey = W, A, q
W
A
J ==
N = (b, J, ...)
(equippedCosmeticsOverride)
N
A = N (.(N)) {}
N, q (equippedCosmeticsOverride)
A[N] = A[N] {}
W, U (q)
A[N][W] = U
A
J ==
spoofConfig.LevelSpoof spoofConfig.SpoofedLevel
spoofConfig.SpoofedLevel
(b, J, ...)
J ==
spoofConfig.KeysSpoof spoofConfig.SpoofedKeys
spoofConfig.SpoofedKeys
(b, J, ...)
J ==
spoofConfig.TokensSpoof spoofConfig.SpoofedTokens
spoofConfig.SpoofedTokens
(b, J, ...)
J ==
spoofConfig.EventCurrSpoof spoofConfig.SpoofedEventCurr
spoofConfig.SpoofedEventCurr
(b, J, ...)
J ==
spoofConfig.GlorySpoof spoofConfig.SpoofedGlory
spoofConfig.SpoofedGlory
(b, J, ...)
J ==
spoofConfig.SkinTicketsSpoof spoofConfig.SpoofedSkinTickets
spoofConfig.SpoofedSkinTickets
(b, J, ...)
J ==
spoofConfig.PlaytimeSpoof spoofConfig.SpoofedPlaytime
spoofConfig.SpoofedPlaytime
(b, J, ...)
J ==
spoofConfig._cachedInvProxy spoofConfig._cachedInvProxySelf == b
spoofConfig._cachedInvProxy
N, A, q = b,
W = ({}, {__index = (U, L)
spooferActive
q
(q, L)
U = ()
q U -A >
q, A = (N, ), U
q ((q, L))
(q, L)
(L)
})
spoofConfig._cachedInvProxy = W
spoofConfig._cachedInvProxySelf = b
W
J ==
weaponUnlockMode ==
N = (b, J, ...)
(spoofConfig._scriptUnlockedWeapons) ~= (spoofConfig._scriptUnlockedWeapons)
N
A = {}
N
q, W (N)
spoofConfig._scriptUnlockedWeapons[W W.Name q]
A[q] = W
A
cachedWeaponInventory
cachedWeaponInventory
N = (b, J, ...)
A = {}
weaponUnlockMode ==
N
q, W (N)
specificUnlockedWeapons[q]
A[q] = W
q (specificUnlockedWeapons)
A[q]
W = ItemDatabase.Items[q]
W W.Class
A[q] = {Name = q, Owned = , Class = W.Class, Unlocked = , Level = , XP = , IsFavorited = favoritedWeaponsMap[q] }
weaponUnlockMode ==
N
q, W (N)
A[q] = W
q, W (WeaponConfig.OwnableWeapons {})
A[W]
q = ItemDatabase.Items[W]
q q.Class
A[W] = {Name = W, Owned = , Class = q.Class, Unlocked = , Level = , XP = , IsFavorited = favoritedWeaponsMap[W] }
weaponUnlockMode ==
N
q, W (N)
A[q] = W
N, q (ItemDatabase.Items)
A[N] q q.Class
A[N] = {Name = N, Owned = , Class = q.Class, Unlocked = , Level = , XP = , IsFavorited = favoritedWeaponsMap[N] }
N, q (A)
favoritedWeaponsMap[N] ~=
q.IsFavorited = favoritedWeaponsMap[N]
cachedWeaponInventory = A
A
J ==
N = (b, J, ...)
(favoritedCosmeticsOverride)
N
A, q = N (.(N)) {}, (b, )
N, W (favoritedCosmeticsOverride)
U, L (W)
L ((U) q ((q, U)))
A[N] = A[N] {}
A[N][U] = L
A
J ==
(equippedEmotesOverride)
(b, J, ...)
N = (b, J, ...)
A = N (.(N)) {}
N, q (equippedEmotesOverride)
q q.Name q.Name ~=
A[N] = q
A
J == J == J ==
spoofConfig.ELOSpoof spoofConfig.SpoofedELO
spoofConfig.SpoofedELO
(b, J, ...)
J ==
spoofConfig.StatsSpoof spoofConfig.SpoofedStats
(b, J, ...)
N = (b, J, ...)
N
N
A, q = .(N), spoofConfig.SpoofedStats
q.casualWins
A.CasualWins = q.casualWins
q.casualLosses
A.CasualLosses = q.casualLosses
q.rankedWins
A.RankedWins = q.rankedWins
q.rankedLosses
A.RankedLosses = q.rankedLosses
q.streak
A.Streak = q.streak
A
spoofConfig.StatsSpoof spoofConfig.SpoofedStats
N = spoofConfig.SpoofedStats
J == N.casualWins
N.casualWins
J == N.casualLosses
N.casualLosses
J == streakSpoofState.streakEnabled
A = streakSpoofState.spoofedStreak
streakSpoofState.streakStackReal
((b, J, ...) ) + A
A
J == N.rankedWins
N.rankedWins
J == N.rankedLosses
N.rankedLosses
J ==
A = N.casualWins ((b, ))
q = A + (N.casualLosses ((b, )) )
q >
A / q
J ==
A = N.rankedWins ((b, ))
q = A + (N.rankedLosses ((b, )) )
q >
A / q
J ==
A, q = N.casualWins ((b, )) , N.casualLosses ((b, ))
N.casualWins N.casualLosses
A + q
J ==
A, q = N.rankedWins ((b, )) , N.rankedLosses ((b, ))
N.rankedWins N.rankedLosses
A + q
spoofConfig.FavSpoof
J == spoofConfig.SpoofedFavWeapons spoofConfig.SpoofedFavWeapons.Primary
spoofConfig.SpoofedFavWeapons.Primary
J == spoofConfig.SpoofedFavWeapons spoofConfig.SpoofedFavWeapons.Secondary
spoofConfig.SpoofedFavWeapons.Secondary
J == spoofConfig.SpoofedFavWeapons spoofConfig.SpoofedFavWeapons.Melee
spoofConfig.SpoofedFavWeapons.Melee
J == spoofConfig.SpoofedFavWeapons spoofConfig.SpoofedFavWeapons.Utility
spoofConfig.SpoofedFavWeapons.Utility
J == spoofConfig.SpoofedFavWeapons
N = spoofConfig.SpoofedFavWeapons.Primary spoofConfig.SpoofedFavWeapons.Secondary spoofConfig.SpoofedFavWeapons.Melee spoofConfig.SpoofedFavWeapons.Utility
N
N
J == spoofConfig.SpoofedFavMap
spoofConfig.SpoofedFavMap
J ==
N, A = (b, J, ...), spoofConfig.ContractSpoof
A A.enabled A.perWeapon
q = N (.(N)) {}
W, U (A.perWeapon)
U (U.kills U.playtime)
L = q[W] (.(q[W])) {}
A.stackReal
U.kills
L.StatisticEliminations = (L.StatisticEliminations ) + U.kills
U.playtime
L.StatisticPlaytime = (L.StatisticPlaytime ) + U.playtime
U.kills
L.StatisticEliminations = U.kills
U.playtime
L.StatisticPlaytime = U.playtime
q[W] = L
q
N
J ==
N = (b, J, ...)
spoofConfig.DuelHistorySpoof spoofConfig.SpoofedDuelHistory #spoofConfig.SpoofedDuelHistory ==
N
A = {}
q, q (spoofConfig.SpoofedDuelHistory)
A[#A + ] = q
spoofConfig.DuelHistoryReplace
A
N (N) ==
q, q (N)
A[#A + ] = q
A
J ==
N = (b, J, ...)
spoofConfig.DuelHistorySpoof spoofConfig.SpoofedELOEvents #spoofConfig.SpoofedELOEvents ==
N
A = {}
q, q (spoofConfig.SpoofedELOEvents)
A[#A + ] = q
spoofConfig.DuelHistoryReplace N (N) ==
q, q (N)
A[#A + ] = q
A
(b, J, ...)
YabujinDeobfuscated.Required[]={,,,,,,,,}
forceUnlockAll, unlockerEnabled, ownershipCache, timestampCache, unlockedTable1, unlockedTable2, unlockedTable3, unlockedTable4, unlockedTable5 = (), (), (), (), (), (), (), (), ()
YabujinDeobfuscated.isCosmeticUnlockedCached = (b)
forceUnlockAll unlockerEnabled
J = ()
N = ownershipCache[b]
N ~= J -(timestampCache[b] ) < cfg.cacheTtl
N
N = unlockedTable1[b] unlockedTable2[b] unlockedTable3[b] unlockedTable4[b] unlockedTable5[b]
ownershipCache[b] = N
timestampCache[b] = J
N
YabujinDeobfuscated.Required[]={,,,,,,,,,,}
unlockerEnabled, origCosmeticController, spoofConfig, unlockedTable1, unlockedTable2, unlockedTable3, unlockedTable4, unlockedTable5, weaponSkinsMap1, weaponSkinsMap2, weaponSkinsMap3 = (), (), (), (), (), (), (), (), (), (), ()
YabujinDeobfuscated.hookOwnsWeaponCosmetic = (b, J, N, A)
N .(N, , ) ==
unlockerEnabled
origCosmeticController.(b, J, N, A)
spoofConfig._menuLockedCosmetics spoofConfig._menuLockedCosmetics[N]
origCosmeticController.(b, J, N, A)
unlockedTable1[N] unlockedTable2[N] unlockedTable3[N] unlockedTable4[N] unlockedTable5[N]
A
J = weaponSkinsMap1[N]
J J[A]
b = weaponSkinsMap2[N]
b b[A]
b = weaponSkinsMap3[N]
b b[A]
YabujinDeobfuscated.Required[]={,,,,,,,}
unlockerEnabled, origCosmeticController, spoofConfig, unlockedTable1, unlockedTable2, unlockedTable3, unlockedTable4, unlockedTable5 = (), (), (), (), (), (), (), ()
YabujinDeobfuscated.hookOwnsUniversalCosmetic = (b, J, N)
N .(N, , ) ==
unlockerEnabled
origCosmeticController.(b, J, N)
spoofConfig._menuLockedCosmetics spoofConfig._menuLockedCosmetics[N]
origCosmeticController.(b, J, N)
unlockedTable1[N] unlockedTable2[N] unlockedTable3[N] unlockedTable4[N] unlockedTable5[N]
YabujinDeobfuscated.Required[]={,,,,,,,,,,}
unlockerEnabled, origCosmeticController, spoofConfig, unlockedTable1, unlockedTable2, unlockedTable3, unlockedTable4, unlockedTable5, weaponSkinsMap1, weaponSkinsMap2, weaponSkinsMap3 = (), (), (), (), (), (), (), (), (), (), ()
YabujinDeobfuscated.hookOwnsGeneralCosmetic = (b, J, N, A)
N .(N, , ) ==
unlockerEnabled
origCosmeticController.(b, J, N, A)
spoofConfig._menuLockedCosmetics spoofConfig._menuLockedCosmetics[N]
origCosmeticController.(b, J, N, A)
unlockedTable1[N] unlockedTable2[N] unlockedTable3[N] unlockedTable4[N] unlockedTable5[N]
A
J = weaponSkinsMap1[N]
J J[A]
b = weaponSkinsMap2[N]
b b[A]
b = weaponSkinsMap3[N]
b b[A]
YabujinDeobfuscated.Required[]={,,,,,,}
unlockerEnabled, origCosmeticController, spoofConfig, isCosmeticUnlocked, weaponSkinsMap1, weaponSkinsMap2, weaponSkinsMap3 = (), (), (), (), (), (), ()
YabujinDeobfuscated.hookOwnsCategoryCosmetic = (b, J, N)
N .(N, , ) ==
unlockerEnabled
origCosmeticController.(b, J, N)
spoofConfig._menuLockedCosmetics spoofConfig._menuLockedCosmetics[N]
origCosmeticController.(b, J, N)
(N)
J = weaponSkinsMap1[N]
J ((J))
b = weaponSkinsMap2[N]
b ((b))
b = weaponSkinsMap3[N]
b ((b))
YabujinDeobfuscated.Required[]={,,,,,,,}
unlockerEnabled, origCosmeticController, spoofConfig, unlockedTable1, unlockedTable2, unlockedTable3, unlockedTable4, unlockedTable5 = (), (), (), (), (), (), (), ()
YabujinDeobfuscated.hookOwnsNormalCosmetic = (b, J, N, A)
N .(N, , ) ==
unlockerEnabled
origCosmeticController.(b, J, N, A)
spoofConfig._menuLockedCosmetics spoofConfig._menuLockedCosmetics[N]
origCosmeticController.(b, J, N, A)
unlockedTable1[N] unlockedTable2[N] unlockedTable3[N] unlockedTable4[N] unlockedTable5[N]
YabujinDeobfuscated.Required[]={,,,,}
spoofConfig, savedSettings, , clientDataController, origShopPurchase = (), (), (), (), ()
YabujinDeobfuscated.hookShopPurchaseSkinTickets = (b, J, N, ...)
spoofConfig.SkinTicketsSpoof N == A = b
.(()
:().Heartbeat:()
q = A:(J)
q
A = q.Prices q.Prices[N]
spoofConfig.SpoofedSkinTickets
spoofConfig.SpoofedSkinTickets = .(, spoofConfig.SpoofedSkinTickets -A)
savedSettings.spoofSkinTickets = spoofConfig.SpoofedSkinTickets
(()
clientDataController.CurrentData:()
)
spoofConfig._onSkinTicketPurchase
spoofConfig.(q)
)
(b, J, N, ...)
YabujinDeobfuscated.Required[]={,,,,,}
, origGenerateLeaderboard, localUserId, spoofConfig, leaderboardConstants, getYabujinSpoofField = (), (), (), (), (), ()
YabujinDeobfuscated.hookLeaderboardSurfaceGui = (b)
(()
J, J (b._player_slots {})
(()
J:()
)
)
b._player_slots = {}
b._generate_hash = (b._generate_hash ) +
b.SurfaceGui b.SurfaceGui.Title
b.SurfaceGui.Title.Text =
J = (b)
(()
N = b._leaderboards_serial b._leaderboards_serial[b._leaderboard_name]
A = N N.Players
A #A == b._player_slots
q, W (b._player_slots)
N = A[q]
N
q = (N.key)
q
q == localUserId spoofConfig.AvatarSpoof spoofConfig.AvatarUserId q == spoofConfig.AvatarUserId
spoofConfig.AvatarSpoof spoofConfig.AvatarUserId spoofConfig.AvatarUserId ~=
(()
W.Left.Headshot.Image = .(leaderboardConstants.HEADSHOT_IMAGE, spoofConfig.AvatarUserId)
)
yabujinUsers[q] yabujinUsers[q].spoofer
b = (q, )
b (b) == b ~=
(()
W.Left.Headshot.Image = .(leaderboardConstants.HEADSHOT_IMAGE, b)
)
)
J
YabujinDeobfuscated.Required[]={,}
origGetPing, pingConfig = (), ()
YabujinDeobfuscated.hookGetNetworkPing = (b, J, ...)
N = (b, J, ...)
pingConfig.PingSpoof
J, b = pingConfig.PingMode , pingConfig.PingValue
J ==
b
J ==
A, q = (pingConfig.PingRandomMin) , (pingConfig.PingRandomMax)
A > q
q, A = A, q
.(A, q)
J ==
.(N * b)
J ==
.(N / b)
J ==
.(N + b)
J ==
.(N -b)
N
YabujinDeobfuscated.Required[]={,,,}
Workspace, stretchConfig, Players, origBillboardOffsets = (), (), (), ()
YabujinDeobfuscated.updateStretchedResolution = ()
b = Workspace.CurrentCamera
b
J, N = stretchConfig.x, stretchConfig.y
J ~= J >
b.CFrame = b.CFrame * .(, , , J, , , , , , , , )
A = b.CFrame.Position
q = b.CFrame.RightVector
W = / J -
J, U (Players:())
J = U.Character
J
U, U (J:())
U:()
J, L (U:())
L:()
origBillboardOffsets[L]
origBillboardOffsets[L] = L.StudsOffsetWorldSpace
J = ((L.Adornee (L.Adornee) == (L.Adornee:()) L.Adornee.Position U.Position) -A):(q)
L.StudsOffsetWorldSpace = origBillboardOffsets[L] + q * (J * W)
N ~=
b.CFrame = b.CFrame * .(, , , , , , , N, , , , )
YabujinDeobfuscated.Required[]={}
motionBlurState = ()
YabujinDeobfuscated.updateCameraMotionBlur = (b)
J = .CurrentCamera
J motionBlurState.blur
N = J.CFrame
motionBlurState.lastCFrame
J = motionBlurState.lastCFrame
A, q = (N.Position -J.Position).Magnitude / .(b, ), (N.LookVector -J.LookVector).Magnitude *
b = .(A * + q * motionBlurState.strength * , , motionBlurState.strength)
motionBlurState.blur.Size = motionBlurState.blur.Size * + b * 0.5
end
motionBlurState.lastCFrame = N
end
end
-- ----------------------------------------------------------------------------
-- Function [78]: syncPartToCameraCFrame (160 bytes)
-- Description: Synchronizes a world part's CFrame directly to workspace.CurrentCamera.CFrame.
-- Resolved Upvalues: [1] = targetPart, [2] = lastCameraCFrame
-- ----------------------------------------------------------------------------
do
YabujinDeobfuscated.Required["syncPartToCameraCFrame"]={"targetPart","lastCameraCFrame"}
local targetPart, lastCameraCFrame = resolve("targetPart"), resolve("lastCameraCFrame")
YabujinDeobfuscated.syncPartToCameraCFrame = function()
local b = workspace.CurrentCamera
if b and targetPart.Parent then
lastCameraCFrame = b.CFrame
targetPart.CFrame = lastCameraCFrame
end
end
end
-- ----------------------------------------------------------------------------
-- Function [85]: syncPartAboveCamera (195 bytes)
-- Description: Positions a target part 32 studs above workspace.CurrentCamera.CFrame.Position.
-- Resolved Upvalues: [1] = pcall, [2] = targetPart
-- ----------------------------------------------------------------------------
do
YabujinDeobfuscated.Required["syncPartAboveCamera"]={"pcall","targetPart"}
local pcall, targetPart = resolve("pcall"), resolve("targetPart")
YabujinDeobfuscated.syncPartAboveCamera = function()
pcall(function()
local b = workspace.CurrentCamera
if b and targetPart.Parent then
targetPart.CFrame = CFrame.new(b.CFrame.Position + Vector3.new(0, 32, 0))
end
end)
end
end
-- ----------------------------------------------------------------------------
-- Function [107]: updateBezierPulseBeams (2106 bytes)
-- Description: Updates 3D cubic Bezier pulse beam parts (size, CFrame orientation, transparency, and ColorSequence keypoints).
-- Resolved Upvalues: [1] = activeBeamsList, [2] = heartbeatConnection, [3] = clockFunc, [4] = calcPulseAlpha, [5] = evalCubicBezier, [6] = simplexNoise, [7] = beamRotationOffset
-- ----------------------------------------------------------------------------
do
YabujinDeobfuscated.Required["updateBezierPulseBeams"]={"activeBeamsList","heartbeatConnection","clockFunc","calcPulseAlpha","evalCubicBezier","simplexNoise","beamRotationOffset"}
local activeBeamsList, heartbeatConnection, clockFunc, calcPulseAlpha, evalCubicBezier, simplexNoise, beamRotationOffset = resolve("activeBeamsList"), resolve("heartbeatConnection"), resolve("clockFunc"), resolve("calcPulseAlpha"), resolve("evalCubicBezier"), resolve("simplexNoise"), resolve("beamRotationOffset")
YabujinDeobfuscated.updateBezierPulseBeams = function()
if next(activeBeamsList) == nil then
if heartbeatConnection then
heartbeatConnection:Disconnect()
heartbeatConnection = nil
end
return
end
for b, J in pairs(activeBeamsList) do
if J.Enabled == true then
J.PartsHidden = false
local N, A, q, W, U, L = 1 -J.MaxTransparency, 1 -J.MinTransparency, J.MinRadius, J.MaxRadius, J.Thickness, J.Parts
local h, B, R, s, d, w, u, C, o, H, z = #L, J.RanNum, J.StartT, J.AnimationSpeed, J.Frequency, J.MinThicknessMultiplier, J.MaxThicknessMultiplier, J.Attachment0, J.Attachment1, J.CurveSize0, J.CurveSize1
local P = C.WorldPosition
local Y = C.WorldPosition + C.WorldAxis * H
local f = o.WorldPosition -o.WorldAxis * z
local l = o.WorldPosition
local Q, v, Z, p, F, a, t = clockFunc() -R, J.PulseLength, J.PulseSpeed, J.FadeLength, J.Color, J.ColorOffsetSpeed, 1 -J.ContractFrom
if Q < (v + 1) / Z then
C, b = P, P
for g = 1, h, 1 do
local _ = L[g]
local L = g / h
H = calcPulseAlpha(L, Z, v, p, Q, N, A)
R, z = evalCubicBezier(P, Y, f, l, L), -Q
local N = s * z + d * 10 * L -0.2 + B * 4
local A = 5 * (s * 0.01 * z / 10 + d * L) + B * 4
local s, d, z = simplexNoise(5 * N, 1.5, 1 * A, 0, 0.6283185307179586) + simplexNoise(0.5 * N, 1.5, 0.1 * A, 0, 5.654866776461628), simplexNoise(3.4, A, N, q, W) * math.exp(- 5000 * (L -0.5) ^ 10), simplexNoise(2.3, A, N, w, u)
local q = g ~= h and(CFrame.new(C, R) * CFrame.Angles(0, 0, s) * CFrame.Angles(math.acos(math.clamp(simplexNoise(A, N, 2.7, 6.123233995736766E-17, 1), -1, 1)), 0, 0) * CFrame.new(0, 0, -d)).Position or R
if H > t then
_.Size = Vector3.new((q -b).Magnitude, U * z * H, U * z * H)
_.CFrame = CFrame.lookAt(0.5 * (b + q), q) * beamRotationOffset
_.Transparency = 1 -H
elseif H > t -1 / (h * p) then
o = (1 -(H -(t -1 / (h * p))) * h * p) * (L < Q * Z -0.5 * v and 1 or -1)
_.Size = Vector3.new((1 -math.abs(o)) * (q -b).Magnitude, U * z * H, U * z * H)
_.CFrame = CFrame.lookAt(b + (q -b) * (math.max(0, o) + 0.5 * (1 -math.abs(o))), q) * beamRotationOffset
_.Transparency = 1 -H
else
_.Transparency = 1
end
if typeof(F) == "Color3" then
_.Color = F
else
L = (B + L -Q * a) % 1
g = F.Keypoints
for M = 1, #g -1, 1 do
if g[M].Time < L and L < g[M + 1].Time then
_.Color = g[M].Value:Lerp(g[M + 1].Value, (L -g[M].Time) / (g[M + 1].Time -g[M].Time))
break
end
end
end
C, b = R, q
end
else
J:Destroy()
end
elseif J.PartsHidden == false then
J.PartsHidden = true
local M = J.DisabledTransparency
for b = 1, #J.Parts, 1 do
J.Parts[b].Transparency = M
end
end
end
end
end
-- ----------------------------------------------------------------------------
-- Function [89]: delayedCall10ms (79 bytes)
-- Description: Waits 0.01s via task.wait and invokes wrapped 2-arg function.
-- Resolved Upvalues: [1] = wrappedFunc
-- ----------------------------------------------------------------------------
do
YabujinDeobfuscated.Required["delayedCall10ms"]={"wrappedFunc"}
local wrappedFunc = resolve("wrappedFunc")
YabujinDeobfuscated.delayedCall10ms = function(b, J)
task.wait(0.01)
return wrappedFunc(b, J)
end
end
-- ----------------------------------------------------------------------------
-- Function [98]: delayedCall20ms (73 bytes)
-- Description: Waits 0.02s via task.wait and invokes wrapped function.
-- Resolved Upvalues: [1] = wrappedFunc
-- ----------------------------------------------------------------------------
do
YabujinDeobfuscated.Required["delayedCall20ms"]={"wrappedFunc"}
local wrappedFunc = resolve("wrappedFunc")
YabujinDeobfuscated.delayedCall20ms = function(b)
task.wait(0.02)
return wrappedFunc(b)
end
end
-- ----------------------------------------------------------------------------
-- Function [79]: delayedCall30ms (73 bytes)
-- Description: Waits 0.03s via task.wait and invokes wrapped function.
-- Resolved Upvalues: [1] = wrappedFunc
-- ----------------------------------------------------------------------------
do
YabujinDeobfuscated.Required["delayedCall30ms"]={"wrappedFunc"}
local wrappedFunc = resolve("wrappedFunc")
YabujinDeobfuscated.delayedCall30ms = function(b)
task.wait(0.03)
return wrappedFunc(b)
end
end
-- ----------------------------------------------------------------------------
-- Function [83]: forwardOptionalCallback (92 bytes)
-- Description: Calls the current callback upvalue if assigned.
-- Resolved Upvalues: [1] = callbackRef
-- ----------------------------------------------------------------------------
do
YabujinDeobfuscated.Required["forwardOptionalCallback"]={"callbackRef"}
local callbackRef = resolve("callbackRef")
YabujinDeobfuscated.forwardOptionalCallback = function(...)
local b = callbackRef
if b then
b(...)
end
end
end
-- ----------------------------------------------------------------------------
-- Function [122]: incrementActiveTickCounter (104 bytes)
-- Description: Increments tick counter upvalue when active flag is true.
-- Resolved Upvalues: [1] = isActive, [2] = tickCounter
-- ----------------------------------------------------------------------------
do
YabujinDeobfuscated.Required["incrementActiveTickCounter"]={"isActive","tickCounter"}
local isActive, tickCounter = resolve("isActive"), resolve("tickCounter")
YabujinDeobfuscated.incrementActiveTickCounter = function()
if not isActive then return
end
tickCounter += 1
end
end
-- ============================================================================
-- PART 2: Embedded Obsidian ThemeManager ([71] — 11,147 bytes)
-- ============================================================================
YabujinDeobfuscated.initObsidianThemeManager = function()
local b, J = cloneref or clonereference or function(N)
return N
end, clonefunction or copyfunction or function(N)
return N
end
local N = b(game:GetService("HttpService"))
local b = isfolder
local A = isfile
local q = listfiles
if typeof(J) == "function" then
local W, U, L = J(b), J(A), J(q)
local J, h = pcall(function()
return W("test" .. tostring(math.random(1000000, 9999999)))
end)
if J == false or typeof(h) ~= "boolean" then
b = function(J)
local h, B = pcall(W, J)
return h and B or false
end
A = function(J)
local W, h = pcall(U, J)
return W and h or false
end
q = function(J)
local W, U = pcall(L, J)
return W and U or{}
end
end
end
local J = {}
do
local W = {"FontColor", "MainColor", "AccentColor", "BackgroundColor", "OutlineColor"}
J.Folder = "ObsidianLibSettings"
J.Library = nil
J.AppliedToTab = false
J.BuiltInThemes = {Default = {1, {FontColor = "dcdce4", MainColor = "1c1c22", AccentColor = "6382ff", BackgroundColor = "121216", OutlineColor = "2a2a32"}}, BBot = {2, {FontColor = "ffffff", MainColor = "1e1e1e", AccentColor = "7e48a3", BackgroundColor = "232323", OutlineColor = "141414"}}, Fatality = {3, {FontColor = "ffffff", MainColor = "1e1842", AccentColor = "c50754", BackgroundColor = "191335", OutlineColor = "3c355d"}}, Jester = {4, {FontColor = "ffffff", MainColor = "242424", AccentColor = "db4467", BackgroundColor = "1c1c1c", OutlineColor = "373737"}}, Mint = {5, {FontColor = "ffffff", MainColor = "242424", AccentColor = "3db488", BackgroundColor = "1c1c1c", OutlineColor = "373737"}}, ["Tokyo Night"] = {6, {FontColor = "ffffff", MainColor = "191925", AccentColor = "6759b3", BackgroundColor = "16161f", OutlineColor = "323232"}}, Ubuntu = {7, {FontColor = "ffffff", MainColor = "3e3e3e", AccentColor = "e2581e", BackgroundColor = "323232", OutlineColor = "191919"}}, Quartz = {8, {FontColor = "ffffff", MainColor = "232330", AccentColor = "426e87", BackgroundColor = "1d1b26", OutlineColor = "27232f"}}, Nord = {9, {FontColor = "eceff4", MainColor = "3b4252", AccentColor = "88c0d0", BackgroundColor = "2e3440", OutlineColor = "4c566a"}}, Dracula = {10, {FontColor = "f8f8f2", MainColor = "44475a", AccentColor = "ff79c6", BackgroundColor = "282a36", OutlineColor = "6272a4"}}, Monokai = {11, {FontColor = "f8f8f2", MainColor = "272822", AccentColor = "f92672", BackgroundColor = "1e1f1c", OutlineColor = "49483e"}}, Gruvbox = {12, {FontColor = "ebdbb2", MainColor = "3c3836", AccentColor = "fb4934", BackgroundColor = "282828", OutlineColor = "504945"}}, Solarized = {13, {FontColor = "839496", MainColor = "073642", AccentColor = "cb4b16", BackgroundColor = "002b36", OutlineColor = "586e75"}}, Catppuccin = {14, {FontColor = "d9e0ee", MainColor = "302d41", AccentColor = "f5c2e7", BackgroundColor = "1e1e2e", OutlineColor = "575268"}}, ["One Dark"] = {15, {FontColor = "abb2bf", MainColor = "282c34", AccentColor = "c678dd", BackgroundColor = "21252b", OutlineColor = "5c6370"}}, Cyberpunk = {16, {FontColor = "f9f9f9", MainColor = "262335", AccentColor = "00ff9f", BackgroundColor = "1a1a2e", OutlineColor = "413c5e"}}, ["Oceanic Next"] = {17, {FontColor = "d8dee9", MainColor = "1b2b34", AccentColor = "6699cc", BackgroundColor = "16232a", OutlineColor = "343d46"}}, Material = {18, {FontColor = "eeffff", MainColor = "212121", AccentColor = "82aaff", BackgroundColor = "151515", OutlineColor = "424242"}}, Minimal = {19, {FontColor = "dcdce4", MainColor = "1c1c22", AccentColor = "6382ff", BackgroundColor = "121216", OutlineColor = "2a2a32"}}}
J.SetLibrary = function(U, L)
U.Library = L
end
J.GetPaths = function(U)
local L, h = {}, U.Folder:split("/")
for B = 1, #h, 1 do
L[#L + 1] = table.concat(h, "/", 1, B)
end
L[#L + 1] = U.Folder .. "/themes"
return L
end
J.BuildFolderTree = function(U)
local L = U:GetPaths()
for h = 1, #L, 1 do
U = L[h]
if not b(U) then
makefolder(U)
end
end
end
J.CheckFolderTree = function(U)
if b(U.Folder) then return
end
U:BuildFolderTree()
task.wait(0.1)
end
J.SetFolder = function(b, U)
b.Folder = U
b:BuildFolderTree()
end
J.ApplyTheme = function(b, U)
local L = b:GetCustomTheme(U)
local h = L or b.BuiltInThemes[U]
if not h then
return
end
for U, B in pairs(L or h[2]) do
if U ~= "VideoLink" then
if U == "FontFace" then
b.Library:SetFont(Enum.Font[B])
if b.Library.Options[U] then
b.Library.Options[U]:SetValue(B)
end
else
b.Library.Scheme[U] = Color3.fromHex(B)
if b.Library.Options[U] then
b.Library.Options[U]:SetValueRGB(Color3.fromHex(B))
end
end
end
end
b:ThemeUpdate()
end
J.ThemeUpdate = function(b)
for U, U in W, nil, nil do
if b.Library.Options and b.Library.Options[U] then
b.Library.Scheme[U] = b.Library.Options[U].Value
end
end
b.Library:UpdateColorsUsingRegistry()
end
J.GetCustomTheme = function(b, U)
local L = b.Folder .. "/themes/" .. U .. ".json"
if not A(L) then
return nil
end
U = readfile(L)
L, b = pcall(N.JSONDecode, N, U)
if not L then
return nil
end
return b
end
J.LoadDefault = function(b)
local U, L, h = "Default", A(b.Folder .. "/themes/default.txt") and(readfile(b.Folder .. "/themes/default.txt")), true
if L then
if b.BuiltInThemes[L] then
U = L
elseif b:GetCustomTheme(L) then
h, U = false, L
end
else
U = if b.BuiltInThemes[b.DefaultTheme] then b.DefaultTheme else U
end
if h then
b.Library.Options.ThemeManager_ThemeList:SetValue(U)
else
b:ApplyTheme(U)
end
end
J.SaveDefault = function(b, U)
writefile(b.Folder .. "/themes/default.txt", U)
end
J.SetDefaultTheme = function(b, U)
assert(b.Library, "Must set ThemeManager.Library first!")
assert(not b.AppliedToTab, "Cannot set default theme after applying ThemeManager to a tab!")
local L, h = {}, {}
for B, B in W, nil, nil do
if typeof(U[B]) == "Color3" then
L[B] = "#" .. U[B]:ToHex()
h[B] = U[B]
elseif typeof(U[B]) == "string" then
L[B] = U[B]:sub(1, 1) == "#" and U[B] or "#" .. U[B]
h[B] = Color3.fromHex(U[B])
else
L[B] = J.BuiltInThemes.Default[2][B]
h[B] = Color3.fromHex(J.BuiltInThemes.Default[2][B])
end
end
if typeof(U.FontFace) == "EnumItem" then
L.FontFace = U.FontFace.Name
h.Font = Font.fromEnum(U.FontFace)
elseif typeof(U.FontFace) == "string" then
L.FontFace = U.FontFace
h.Font = Font.fromEnum(Enum.Font[U.FontFace])
else
L.FontFace = "Code"
h.Font = Font.fromEnum(Enum.Font.Code)
end
U = {"RedColor", "DarkColor", "WhiteColor"}
for B, B in U, nil, nil do
h[B] = b.Library.Scheme[B]
end
b.Library.Scheme = h
b.BuiltInThemes.Default = {1, L}
b.Library:UpdateColorsUsingRegistry()
end
J.SaveCustomTheme = function(b, U)
if U:gsub(" ", "") == "" then b.Library:Notify("Invalid file name for theme (empty)", 3)
return
end
local L = {}
for h, h in W, nil, nil do
L[h] = b.Library.Options[h].Value:ToHex()
end
L.FontFace = b.Library.Options.FontFace.Value
writefile(b.Folder .. "/themes/" .. U .. ".json", N:JSONEncode(L))
end
J.Delete = function(b, N)
if not N then return false, "no config file is selected"
end
local W = b.Folder .. "/themes/" .. N .. ".json"
if not A(W) then
return false, "invalid file"
end
if not pcall(delfile, W) then
return false, "delete file error"
end
return true
end
J.ReloadCustomThemes = function(b)
local N, A = q(b.Folder .. "/themes"), {}
for q = 1, #N, 1 do
b = N[q]
if b:sub(- 5) == ".json" then
q = b:find(".json", 1, true)
local N, W = (b:sub(q, q)), q
while N ~= "/" and N ~= "\\" and N ~= "" do
q -= 1
N = (b:sub(q, q))
end
if N == "/" or N == "\\" then
table.insert(A, b:sub(q + 1, W -1))
end
end
end
return A
end
J.CreateThemeManager = function(b, N)
N:AddLabel("Background color"):AddColorPicker("BackgroundColor", {Default = b.Library.Scheme.BackgroundColor})
N:AddLabel("Main color"):AddColorPicker("MainColor", {Default = b.Library.Scheme.MainColor})
N:AddLabel("Accent color"):AddColorPicker("AccentColor", {Default = b.Library.Scheme.AccentColor})
N:AddLabel("Outline color"):AddColorPicker("OutlineColor", {Default = b.Library.Scheme.OutlineColor})
N:AddLabel("Font color"):AddColorPicker("FontColor", {Default = b.Library.Scheme.FontColor})
N:AddDropdown("FontFace", {Text = "Font Face", Default = "Code", Values = {"BuilderSans", "Code", "Fantasy", "Gotham", "Jura", "Roboto", "RobotoMono", "SourceSans"}})
local A = {}
for q, W in pairs(b.BuiltInThemes) do
table.insert(A, q)
end
table.sort(A, function(q, W)
return b.BuiltInThemes[q][1] < b.BuiltInThemes[W][1]
end)
N:AddDivider()
N:AddDropdown("ThemeManager_ThemeList", {Text = "Theme list", Values = A, Default = 1})
N:AddButton("Set as default", function()
b:SaveDefault(b.Library.Options.ThemeManager_ThemeList.Value)
b.Library:Notify(string.format("Set default theme to %q", b.Library.Options.ThemeManager_ThemeList.Value))
end)
b.Library.Options.ThemeManager_ThemeList:OnChanged(function()
b:ApplyTheme(b.Library.Options.ThemeManager_ThemeList.Value)
end)
N:AddDivider()
N:AddInput("ThemeManager_CustomThemeName", {Text = "Custom theme name"})
N:AddButton("Create theme", function()
local A = b.Library.Options.ThemeManager_CustomThemeName.Value
if A:gsub(" ", "") == "" then
b.Library:Notify("Invalid theme name (empty)", 2)
return
end
b:SaveCustomTheme(A)
b.Library:Notify(string.format("Created theme %q", A))
b.Library.Options.ThemeManager_CustomThemeList:SetValues(b:ReloadCustomThemes())
b.Library.Options.ThemeManager_CustomThemeList:SetValue(nil)
end)
N:AddDivider()
N:AddDropdown("ThemeManager_CustomThemeList", {Text = "Custom themes", Values = b:ReloadCustomThemes(), AllowNull = true, Default = 1})
N:AddButton("Load theme", function()
local A = b.Library.Options.ThemeManager_CustomThemeList.Value
b:ApplyTheme(A)
b.Library:Notify(string.format("Loaded theme %q", A))
end)
N:AddButton("Overwrite theme", function()
local A = b.Library.Options.ThemeManager_CustomThemeList.Value
b:SaveCustomTheme(A)
b.Library:Notify(string.format("Overwrote config %q", A))
end)
N:AddButton("Delete theme", function()
local A = b.Library.Options.ThemeManager_CustomThemeList.Value
local q, W = b:Delete(A)
if not q then
b.Library:Notify("Failed to delete theme: " .. W)
return
end
b.Library:Notify(string.format("Deleted theme %q", A))
b.Library.Options.ThemeManager_CustomThemeList:SetValues(b:ReloadCustomThemes())
b.Library.Options.ThemeManager_CustomThemeList:SetValue(nil)
end)
N:AddButton("Refresh list", function()
b.Library.Options.ThemeManager_CustomThemeList:SetValues(b:ReloadCustomThemes())
b.Library.Options.ThemeManager_CustomThemeList:SetValue(nil)
end)
N:AddButton("Set as default", function()
if b.Library.Options.ThemeManager_CustomThemeList.Value ~= nil and b.Library.Options.ThemeManager_CustomThemeList.Value ~= "" then b:SaveDefault(b.Library.Options.ThemeManager_CustomThemeList.Value)
b.Library:Notify(string.format("Set default theme to %q", b.Library.Options.ThemeManager_CustomThemeList.Value))
end
end)
N:AddButton("Reset default", function()
if not pcall(delfile, b.Folder .. "/themes/default.txt") then b.Library:Notify("Failed to reset default: delete file error")
return
end
b.Library:Notify("Set default theme to nothing")
b.Library.Options.ThemeManager_CustomThemeList:SetValues(b:ReloadCustomThemes())
b.Library.Options.ThemeManager_CustomThemeList:SetValue(nil)
end)
b:LoadDefault()
b.AppliedToTab = true
local function M()
b:ThemeUpdate()
end
b.Library.Options.BackgroundColor:OnChanged(M)
b.Library.Options.MainColor:OnChanged(M)
b.Library.Options.AccentColor:OnChanged(M)
b.Library.Options.OutlineColor:OnChanged(M)
b.Library.Options.FontColor:OnChanged(M)
b.Library.Options.FontFace:OnChanged(function(M)
b.Library:SetFont(Enum.Font[M])
b.Library:UpdateColorsUsingRegistry()
end)
end
J.CreateGroupBox = function(M, b)
assert(M.Library, "Must set ThemeManager.Library first!")
return b:AddLeftGroupbox("Themes", "paintbrush")
end
J.ApplyToTab = function(M, b)
assert(M.Library, "Must set ThemeManager.Library first!")
M:CreateThemeManager((M:CreateGroupBox(b)))
end
J.ApplyToGroupbox = function(M, b)
assert(M.Library, "Must set ThemeManager.Library first!")
M:CreateThemeManager(b)
end
J:BuildFolderTree()
end
getgenv().ObsidianThemeManager = J
return J
end
-- ============================================================================
-- PART 3: Embedded YabujinLibrary / Obsidian UI Library ([56] — 146,597 bytes)
-- ============================================================================
do
local yabujinCoreState = { _withId=function(fn, ...) return YabujinDeobfuscated.runWithElevatedThreadIdentity(fn, ...) end }
YabujinDeobfuscated.initYabujinObsidianLibrary = function()
local upval_3 = context.AssetBaseUrl or ""
local b = Instance.new
yabujinCoreState._instNew = b
local J = cloneref or clonereference or function(N)
return N
end
local N, A, q, W, U, L, h, B, R, s, d = J(game:GetService("CoreGui")), J(game:GetService("Players")), J(game:GetService("RunService")), J(game:GetService("SoundService")), J(game:GetService("UserInputService")), J(game:GetService("TextService")), J(game:GetService("Teams")), J(game:GetService("TweenService")), getgenv or function()
return shared
end, setclipboard or nil, protectgui or syn and syn.protect_gui or function()
end
local w, u = gethui or function()
return N
end, A.LocalPlayer or(A.PlayerAdded:Wait())
local C = J(u:GetMouse())
local J = {}
local o = {}
local H = {}
local z = {}
local P = {}
local Y = {}
local f = {TransparencyTexture = {RobloxId = 139785960036434, Path = "Obsidian/assets/TransparencyTexture.png", URL = "https://raw.githubusercontent.com/deividcomsono/Obsidian/refs/heads/main/assets/TransparencyTexture.png", Id = nil}, SaturationMap = {RobloxId = 4155801252, Path = "Obsidian/assets/SaturationMap.png", URL = "https://raw.githubusercontent.com/deividcomsono/Obsidian/refs/heads/main/assets/SaturationMap.png", Id = nil}, ShadowImage = {RobloxId = 6015897843, Path = "Obsidian/assets/shadow.png", URL = "https://raw.githubusercontent.com/deividcomsono/Obsidian/refs/heads/main/assets/shadow.png", Id = nil}, HoverSound = {RobloxId = 6895079853, Path = "Obsidian/assets/sounds/hover.wav", URL = "https://raw.githubusercontent.com/deividcomsono/Obsidian/refs/heads/main/assets/sounds/hover.wav", Id = nil}, ClickSound = {RobloxId = 6895079853, Path = "Obsidian/assets/sounds/click.wav", URL = "https://raw.githubusercontent.com/deividcomsono/Obsidian/refs/heads/main/assets/sounds/click.wav", Id = nil}, ToggleOnSound = {RobloxId = 6895079853, Path = "Obsidian/assets/sounds/toggle_on.wav", URL = "https://raw.githubusercontent.com/deividcomsono/Obsidian/refs/heads/main/assets/sounds/toggle_on.wav", Id = nil}, ToggleOffSound = {RobloxId = 6895079853, Path = "Obsidian/assets/sounds/toggle_off.wav", URL = "https://raw.githubusercontent.com/deividcomsono/Obsidian/refs/heads/main/assets/sounds/toggle_off.wav", Id = nil}}
do
local function l(Q, v)
if not isfolder or not makefolder then return
end
local Z = Q:split("/")
if v then
table.remove(Z, #Z)
end
Q = ""
for v, v in ipairs(Z) do
if not isfolder(Q .. v) then
makefolder(Q .. v)
end
Q ..= v .. "/"
end
return Q
end
Y.AddAsset = function(Q, v, Z, p)
if f[Q] ~= nil then error(string.format("Asset %q already exists", Q))
end
assert(typeof(v) == "number", "RobloxAssetId must be a number")
f[Q] = {RobloxId = v, Path = string.format("Obsidian/custom_assets/%s", Q), URL = Z, Id = nil}
Y.DownloadAsset(Q, p)
end
Y.GetAsset = function(Q)
if not f[Q] then return nil
end
local v = f[Q]
if v.Id then
return v.Id
end
Q = string.format("rbxassetid://%s", v.RobloxId)
if getcustomasset then
local Z, p = pcall(getcustomasset, v.Path)
Q = if Z and p then p else Q
end
v.Id = Q
return Q
end
Y.DownloadAsset = function(Q, v)
if not getcustomasset or not writefile or not isfile then return false, "missing functions"
end
local Z = f[Q]
l(Z.Path, true)
if v ~= true and(isfile(Z.Path)) then
return true, nil
end
Q, v = pcall(function()
local l
if(identifyexecutor and(identifyexecutor()) or "Unknown") == "Wave" and request then
local p, F = pcall(request, {Url = Z.URL, Method = "GET"})
l = if p and F and F.Body then F.Body else l
end
writefile(Z.Path, if not l then(game:HttpGet(Z.URL)) else l)
end)
return Q, v
end
-- Use native Roblox asset IDs without downloading files.
end
local f = {LocalPlayer = u, DevicePlatform = nil, IsMobile = false, IsRobloxFocused = true, ScreenGui = nil, SearchText = "", Searching = false, GlobalSearch = false, LastSearchTab = nil, ActiveTab = nil, Tabs = {}, TabButtons = {}, DependencyBoxes = {}, KeybindFrame = nil, KeybindContainer = nil, KeybindToggles = {}, Notifications = {}, ToggleKeybind = Enum.KeyCode.RightControl, TweenInfo = TweenInfo.new(0.18, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), NotifyTweenInfo = TweenInfo.new(0.35, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), Toggled = false, Unloaded = false, Labels = J, Buttons = o, Toggles = H, Options = z, NotifySide = "Right", ShowCustomCursor = true, ForceCheckbox = false, ShowToggleFrameInKeybinds = true, NotifyOnError = false, CantDragForced = false, Signals = {}, UnloadSignals = {}, OriginalMinSize = Vector2.new(480, 360), MinSize = Vector2.new(480, 360), DPIScale = 1, CornerRadius = 12, IsLightTheme = false, Scheme = {BackgroundColor = Color3.fromRGB(13, 14, 18), MainColor = Color3.fromRGB(21, 22, 28), AccentColor = Color3.fromRGB(150, 120, 255), OutlineColor = Color3.fromRGB(34, 36, 46), FontColor = Color3.fromRGB(236, 237, 244), Font = (function()
local l, Q = pcall(function()
return Font.fromEnum(Enum.Font.BuilderSansMedium)
end)
if l and Q then
return Q
end
return Font.fromEnum(Enum.Font.GothamMedium)
end)(), RedColor = Color3.fromRGB(255, 70, 90), DarkColor = Color3.new(0, 0, 0), WhiteColor = Color3.new(1, 1, 1)}, Registry = {}, Scales = {}, ImageManager = Y}
if q:IsStudio() then
if U.TouchEnabled and not U.MouseEnabled then
f.IsMobile = true
f.OriginalMinSize = Vector2.new(480, 240)
else
f.IsMobile = false
f.OriginalMinSize = Vector2.new(480, 360)
end
else
pcall(function()
f.DevicePlatform = U:GetPlatform()
end)
f.IsMobile = f.DevicePlatform == Enum.Platform.Android or f.DevicePlatform == Enum.Platform.IOS
f.OriginalMinSize = f.IsMobile and(Vector2.new(480, 240)) or(Vector2.new(480, 360))
end
local l, Q, v, Z, p = {Frame = {BorderSizePixel = 0}, ImageLabel = {BackgroundTransparency = 1, BorderSizePixel = 0}, ImageButton = {AutoButtonColor = false, BorderSizePixel = 0}, ScrollingFrame = {BorderSizePixel = 0}, TextLabel = {BorderSizePixel = 0, FontFace = "Font", RichText = true, TextColor3 = "FontColor"}, TextButton = {AutoButtonColor = false, BorderSizePixel = 0, FontFace = "Font", RichText = true, TextColor3 = "FontColor"}, TextBox = {BorderSizePixel = 0, FontFace = "Font", PlaceholderColor3 = function()
local F, a, t = f.Scheme.FontColor:ToHSV()
return Color3.fromHSV(F, a, t / 2)
end, Text = "", TextColor3 = "FontColor"}, UIListLayout = {SortOrder = Enum.SortOrder.LayoutOrder}, UIStroke = {ApplyStrokeMode = Enum.ApplyStrokeMode.Border}, Window = {Title = "No Title", Footer = "No Footer", Position = UDim2.fromOffset(6, 6), Size = UDim2.fromOffset(720, 600), IconSize = UDim2.fromOffset(30, 30), AutoShow = true, Center = true, Resizable = true, SearchbarSize = UDim2.fromScale(1, 1), GlobalSearch = false, CornerRadius = 8, NotifySide = "Right", ShowCustomCursor = true, Font = Enum.Font.GothamMedium, ToggleKeybind = Enum.KeyCode.RightControl, MobileButtonsSide = "Left", UnlockMouseWhileOpen = true, EnableBlur = true, EnableSnowfall = false, GlassType = "None", EnableFadeIn = true, EnableSidebarResize = false, EnableCompacting = true, DisableCompactingSnap = false, SidebarCompacted = false, MinContainerWidth = 256, MinSidebarWidth = 128, SidebarCompactWidth = 48, SidebarCollapseThreshold = 0.5, CompactWidthActivation = 128}, Toggle = {Text = "Toggle", Default = false, Callback = function()
end, Changed = function()
end, Risky = false, Disabled = false, Visible = true}, Input = {Text = "Input", Default = "", Finished = false, Numeric = false, ClearTextOnFocus = true, Placeholder = "", AllowEmpty = true, EmptyReset = "---", Callback = function()
end, Changed = function()
end, Disabled = false, Visible = true}, Slider = {Text = "Slider", Default = 0, Min = 0, Max = 100, Rounding = 0, Prefix = "", Suffix = "", Callback = function()
end, Changed = function()
end, Disabled = false, Visible = true}, Dropdown = {Values = {}, DisabledValues = {}, Multi = false, MaxVisibleDropdownItems = 8, Callback = function()
end, Changed = function()
end, Disabled = false, Visible = true}, Viewport = {Object = nil, Camera = nil, Clone = true, AutoFocus = true, Interactive = false, Zoom = true, Height = 200, Visible = true}, Image = {Image = "", Transparency = 0, BackgroundTransparency = 0, Color = Color3.new(1, 1, 1), RectOffset = Vector2.zero, RectSize = Vector2.zero, ScaleType = Enum.ScaleType.Fit, Height = 200, Visible = true}, Video = {Video = "", Looped = false, Playing = false, Volume = 1, Height = 200, Visible = true}, UIPassthrough = {Instance = nil, Height = 24, Visible = true}, KeyPicker = {Text = "KeyPicker", Default = "None", DefaultModifiers = {}, Mode = "Toggle", Modes = {"Always", "Toggle", "Hold"}, SyncToggleState = false, Callback = function()
end, ChangedCallback = function()
end, Changed = function()
end, Clicked = function()
end
}, ColorPicker = {Default = Color3.new(1, 1, 1), Callback = function()
end, Changed = function()
end
}}, {Bottom = {0, 1}, Right = {1, 0}}, {Left = {0.5, 1}, Right = {0.5, 1}}, {RedColor = "Red", WhiteColor = "White", DarkColor = "Dark"}, {Red = "RedColor", White = "WhiteColor", Dark = "DarkColor"}
local function F(a)
if not a then return nil
end
local t = Z[a]
if t and f.Scheme[t] ~= nil then
f.Scheme[a] = f.Scheme[t]
f.Scheme[t] = nil
return f.Scheme[a]
end
t = p[a]
if t and f.Scheme[t] ~= nil then
warn(string.format("Scheme Value %q is deprecated, please use %q instead.", a, t))
return f.Scheme[t]
end
return f.Scheme[a]
end
local function Z(p, a, t)
local g = Instance.new("BindableEvent")
local _ = p:Once(function(...)
if not t or typeof(t) == "function" and(t(...)) then g:Fire(true)
else
g:Fire(false)
end
end)
task.delay(a, function()
_:Disconnect()
g:Fire(false)
end)
p = g.Event:Wait()
g:Destroy()
return p
end
local function p(a, t)
return a.UserInputType == Enum.UserInputType.MouseButton1 or t == true and a.UserInputType == Enum.UserInputType.MouseButton2 or a.UserInputType == Enum.UserInputType.Touch
end
local function a(t, g)
return p(t, g) and t.UserInputState == Enum.UserInputState.Begin and f.IsRobloxFocused
end
local function t(g)
return(g.UserInputType == Enum.UserInputType.MouseMovement or g.UserInputType == Enum.UserInputType.Touch) and g.UserInputState == Enum.UserInputState.Change
end
local function g(_, c)
return p(_, c) and(_.UserInputState == Enum.UserInputState.Begin or _.UserInputState == Enum.UserInputState.Change) and f.IsRobloxFocused
end
local function p(_)
local c = 0
for e, e in pairs(_) do
c += 1
end
return c
end
local function _(c)
if not(c and c.PlaybackState == Enum.PlaybackState.Playing) then return
end
c:Cancel()
end
local function c(e)
return e:match("^%s*(.-)%s*$")
end
local function e(r, I)
assert(I >= 0, "Invalid rounding number.")
if I == 0 then
return math.floor(r)
end
return tonumber(string.format("%." .. I .. "f", r))
end
local function r(I)
local x = A:GetPlayers()
if I then
local I = table.find(x, u)
if I then
table.remove(x, I)
end
end
table.sort(x, function(u, I)
return u.Name:lower() < I.Name:lower()
end)
return x
end
local function u()
local I = h:GetTeams()
table.sort(I, function(x, D)
return x.Name:lower() < D.Name:lower()
end)
return I
end
f.UpdateDependencyBoxes = function(I)
for I, I in pairs(f.DependencyBoxes) do
I:Update(true)
end
if f.Searching then
f:UpdateSearch(f.SearchText)
end
end
local function I(x, D)
local X = 0
for V, K in pairs(x.Elements) do
if K.Type == "Divider" then
K.Holder.Visible = false
elseif K.SubButton then
local j, O = false, K.Text:lower():match(D) and K.Visible
if O then
j = true
else
K.Base.Visible = false
end
V = K.SubButton.Text:lower():match(D) and K.SubButton.Visible
if V then
j = true
else
K.SubButton.Base.Visible = false
end
K.Holder.Visible = j
X = if j then X + 1 else X
elseif K.Text and(K.Text:lower():match(D)) and K.Visible then
K.Holder.Visible = true
X += 1
else
K.Holder.Visible = false
end
end
for V, V in pairs(x.DependencyBoxes) do
X = if V.Visible then X + I(V, D) else X
end
x.Holder.Visible = X > 0
return X
end
local function x(D)
for X, X in pairs(D.Elements) do
X.Holder.Visible = typeof(X.Visible) == "boolean" and X.Visible or true
if X.SubButton then
X.Base.Visible = X.Visible
X.SubButton.Base.Visible = X.SubButton.Visible
end
end
D:Resize()
D.Holder.Visible = true
for X, X in pairs(D.DependencyBoxes) do
if X.Visible then
x(X)
end
end
end
local function D(X, V)
if not X then return
end
local K = false
for j, O in pairs(X.Groupboxes) do
j = 0
for m, k in pairs(O.Elements) do
if k.Type == "Divider" then
k.Holder.Visible = false
elseif k.SubButton then
local n, E = false, k.Text:lower():match(V) and k.Visible
if E then
n = true
else
k.Base.Visible = false
end
m = k.SubButton.Text:lower():match(V) and k.SubButton.Visible
if m then
n = true
else
k.SubButton.Base.Visible = false
end
k.Holder.Visible = n
j = if n then j + 1 else j
elseif k.Text and(k.Text:lower():match(V)) and k.Visible then
k.Holder.Visible = true
j += 1
else
k.Holder.Visible = false
end
end
for m, m in pairs(O.DependencyBoxes) do
j = if m.Visible then j + I(m, V) else j
end
if j > 0 then
O:Resize()
K = true
end
O.BoxHolder.Visible = j > 0
end
for j, O in pairs(X.Tabboxes) do
j = {}
for X, m in pairs(O.Tabs) do
j[m] = 0
for k, n in pairs(m.Elements) do
if n.Type == "Divider" then
n.Holder.Visible = false
elseif n.SubButton then
X, k = false, n.Text:lower():match(V) and n.Visible
if k then
X = true
else
n.Base.Visible = false
end
local k = n.SubButton.Text:lower():match(V) and n.SubButton.Visible
if k then
X = true
else
n.SubButton.Base.Visible = false
end
n.Holder.Visible = X
if X then
j[m] = j[m] + 1
end
elseif n.Text and(n.Text:lower():match(V)) and n.Visible then
n.Holder.Visible = true
j[m] = j[m] + 1
else
n.Holder.Visible = false
end
end
for X, X in pairs(m.DependencyBoxes) do
if X.Visible then
j[m] = j[m] + I(X, V)
end
end
end
local I = 0
for X, V in pairs(j) do
X.ButtonHolder.Visible = V > 0
if V > 0 then
I += 1
if O.ActiveTab == X then
X:Resize()
elseif O.ActiveTab and j[O.ActiveTab] == 0 then
X:Show()
end
K = true
end
end
O.BoxHolder.Visible = I > 0
end
return K
end
local function I(X)
if not X then return
end
for V, V in pairs(X.Groupboxes) do
for K, K in pairs(V.Elements) do
K.Holder.Visible = typeof(K.Visible) == "boolean" and K.Visible or true
if K.SubButton then
K.Base.Visible = K.Visible
K.SubButton.Base.Visible = K.SubButton.Visible
end
end
for K, K in pairs(V.DependencyBoxes) do
if K.Visible then
x(K)
end
end
V:Resize()
V.BoxHolder.Visible = true
end
for V, V in pairs(X.Tabboxes) do
for X, X in pairs(V.Tabs) do
for K, K in pairs(X.Elements) do
K.Holder.Visible = typeof(K.Visible) == "boolean" and K.Visible or true
if K.SubButton then
K.Base.Visible = K.Visible
K.SubButton.Base.Visible = K.SubButton.Visible
end
end
for K, K in pairs(X.DependencyBoxes) do
if K.Visible then
x(K)
end
end
X.ButtonHolder.Visible = true
end
if V.ActiveTab then
V.ActiveTab:Resize()
end
V.BoxHolder.Visible = true
end
end
f.UpdateSearch = function(x, X)
f.SearchText = X
x = {}
if f.GlobalSearch then
for V, V in pairs(f.Tabs) do
if typeof(V) == "table" and not V.IsKeyTab then
table.insert(x, V)
end
end
elseif f.LastSearchTab and typeof(f.LastSearchTab) == "table" then
table.insert(x, f.LastSearchTab)
end
for V, V in ipairs(x) do
I(V)
end
local I = X:lower()
if c(I) == "" then
f.Searching = false
f.LastSearchTab = nil
return
end
if not f.GlobalSearch and f.ActiveTab and f.ActiveTab.IsKeyTab then
f.Searching = false
f.LastSearchTab = nil
return
end
f.Searching = true
local V = {}
if f.GlobalSearch then
if#x == 0 then
for K, K in pairs(f.Tabs) do
if typeof(K) == "table" and not K.IsKeyTab then
table.insert(x, K)
end
end
end
V = x
elseif f.ActiveTab then
table.insert(V, f.ActiveTab)
end
local K
x = false
for j, j in ipairs(V) do
if D(j, I) then
if not K then
K = j
end
x = if j == f.ActiveTab then true else x
end
end
if f.GlobalSearch then
if x and f.ActiveTab then
f.ActiveTab:RefreshSides()
elseif K then
local I = X
task.defer(function()
if f.SearchText ~= I then return
end
if f.ActiveTab ~= K then
K:Show()
end
end)
end
f.LastSearchTab = nil
else
f.LastSearchTab = f.ActiveTab
end
end
f.AddToRegistry = function(I, I, x)
f.Registry[I] = x
end
f.RemoveFromRegistry = function(I, I)
f.Registry[I] = nil
end
f.UpdateColorsUsingRegistry = function(I)
for x, D in pairs(f.Registry) do
for X, V in pairs(D) do
I = F(V)
if I or typeof(V) == "function" then
x[X] = I or(V())
end
end
end
end
f.SetDPIScale = function(I, I)
f.DPIScale = I / 100
f.MinSize = f.OriginalMinSize * f.DPIScale
for I, I in pairs(f.Scales) do
I.Scale = f.DPIScale
end
for I, I in pairs(z) do
if I.Type == "Dropdown" then
I:RecalculateListSize()
end
end
for I, I in pairs(f.Notifications) do
I:Resize()
end
end
f.GiveSignal = function(I, x)
I = typeof(x)
if x and(I == "RBXScriptConnection" or I == "RBXScriptSignal") then
table.insert(f.Signals, x)
end
return x
end
f.PlaySound = function(I, I, I, I)
end
f.LoadSounds = function(I)
end
function IsValidCustomIcon(I)
return typeof(I) == "string" and(I:match("rbxasset") or(I:match("roblox%.com/asset/%?id=")) or(I:match("rbxthumb://type=")))
end
local I, x = false
do
local D, X = upval_3 .. "/Lucide/source.lua"
local function V(K)
if X then return
end
if request then
pcall(function()
local j = request({Url = K, Method = "GET"})
local O = j and j.Body and#j.Body > 100
if O then
X = j.Body
end
end)
end
if not X then
pcall(function()
local j = game:HttpGet(K)
local K = j and#j > 100
if K then
X = j
end
end)
end
end
if upval_3 ~= "" then V(D) end
V("https://raw.githubusercontent.com/deividcomsono/lucide-roblox-direct/refs/heads/main/source.lua")
if X then
pcall(function()
if upval_3 ~= "" then X = X:gsub("https://raw%.githubusercontent%.com/deividcomsono/lucide%-roblox%-direct/refs/heads/main/spritesheets/", upval_3 .. "/Lucide/spritesheets/") end
end)
pcall(function()
local D = loadstring(X)
if D then
local X = D()
if X and X.GetAsset then
I, x = true, X
end
end
end)
end
end
f.GetIcon = function(D, D)
if not I or not x then return
end
local X, V = pcall(x.GetAsset, D)
if not X or not V then
return
end
return V
end
f.GetCustomIcon = function(D, D)
if not IsValidCustomIcon(D) then return f:GetIcon(D)
else
return{Url = D, ImageRectOffset = Vector2.zero, ImageRectSize = Vector2.zero, Custom = true}
end
end
f.Validate = function(D, D, X)
if typeof(D) ~= "table" then return X
end
for V, K in pairs(X) do
if typeof(V) ~= "number" then
if typeof(K) == "table" then
D[V] = f:Validate(D[V], K)
elseif D[V] == nil then
D[V] = K
end
end
end
return D
end
local D = {ScreenGui = true, SurfaceGui = true, BillboardGui = true, Lighting = true, UIScale = true, UIListLayout = true, UIGridLayout = true, UITableLayout = true, UIPageLayout = true, UIAspectRatioConstraint = true, UISizeConstraint = true, UITextSizeConstraint = true, UICorner = true, UIPadding = true, UIGradient = true, UIStroke = true, UIFlexItem = true}
local function X(V, K)
local j = f.Registry[K] or{}
for O, m in pairs(V) do
if j[O] then
j[O] = nil
elseif O ~= "Text" then
local V = F(m)
if V or typeof(m) == "function" then
j[O] = m
m = V or(m())
end
end
K[O] = m
end
if p(j) > 0 then
f.Registry[K] = j
end
end
local function F(V, K)
local j = b(V)
if l[V] then
X(l[V], j)
end
X(K, j)
if K.Parent and not K.ZIndex and not D[V] and not D[K.Parent.ClassName] then
pcall(function()
j.ZIndex = K.Parent.ZIndex
end)
end
return j
end
local function b(D, X)
if not(pcall(function()
local V = X
if not V then
X = N
end
D.Parent = if typeof(X) == "function" then(X()) else X
end) and D.Parent) then
D.Parent = f.LocalPlayer:WaitForChild("PlayerGui", math.huge)
end
end
local function D(X, V)
if V then b(X, N)
return
end
pcall(d, X)
b(X, w)
end
local b = F("ScreenGui", {Name = "Obsidian", DisplayOrder = 999, ResetOnSpawn = false})
D(b)
f.ScreenGui = b
b.DescendantRemoving:Connect(function(N)
f:RemoveFromRegistry(N)
end)
local N = F("TextButton", {BackgroundTransparency = 1, Modal = false, Size = UDim2.fromScale(0, 0), AnchorPoint = Vector2.zero, Text = "", ZIndex = -999, Parent = b})
local d, w
do
d = F("Frame", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = "WhiteColor", Size = UDim2.fromOffset(9, 1), Visible = false, ZIndex = 999, Parent = b})
F("Frame", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = "DarkColor", Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.new(1, 2, 1, 2), ZIndex = 998, Parent = d})
D = F("Frame", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = "WhiteColor", Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromOffset(1, 9), Parent = d})
F("Frame", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = "DarkColor", Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.new(1, 2, 1, 2), ZIndex = 998, Parent = D})
w = F("ImageLabel", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundTransparency = 1, Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromOffset(20, 20), ZIndex = 1000, Visible = false, Parent = d})
end
local D
do
D = F("Frame", {AnchorPoint = Vector2.new(1, 0), BackgroundTransparency = 1, Position = UDim2.new(1, -6, 0, 6), Size = UDim2.new(0, 300, 1, -6), Parent = b})
table.insert(f.Scales, (F("UIScale", {Parent = D})))
F("UIListLayout", {HorizontalAlignment = Enum.HorizontalAlignment.Right, Padding = UDim.new(0, 8), Parent = D})
end
f.ResetCursorIcon = function(X)
w.Visible = false
w.Size = UDim2.fromOffset(20, 20)
end
f.ChangeCursorIcon = function(X, V)
if not V or V == "" then f:ResetCursorIcon()
return
end
X = f:GetCustomIcon(V)
assert(X, "Image must be a valid Roblox asset or a valid URL or a valid lucide icon.")
w.Visible = true
w.Image = X.Url
w.ImageRectOffset = X.ImageRectOffset
w.ImageRectSize = X.ImageRectSize
end
f.ChangeCursorIconSize = function(X, X)
assert(typeof(X) == "UDim2", "UDim2 expected.")
w.Size = X
end
f.GetBetterColor = function(X, X, V)
V*=f.IsLightTheme and -4 or 2
return Color3.fromRGB(math.clamp(X.R * 255 + V, 0, 255), math.clamp(X.G * 255 + V, 0, 255), math.clamp(X.B * 255 + V, 0, 255))
end
f.GetLighterColor = function(X, X)
local V, K, j = X:ToHSV()
return Color3.fromHSV(V, math.max(0, K -0.1), math.min(1, j + 0.1))
end
f.GetDarkerColor = function(X, X)
local V, K, j = X:ToHSV()
return Color3.fromHSV(V, K, j / 2)
end
f.GetKeyString = function(X, X)
if X.EnumType == Enum.KeyCode and X.Value > 33 and X.Value < 127 then return string.char(X.Value)
end
return X.Name
end
f.GetTextBounds = function(X, V, K, j, O)
X = Instance.new("GetTextBoundsParams")
X.Text = V
X.RichText = true
X.Font = K
X.Size = j
X.Width = O or workspace.CurrentCamera.ViewportSize.X -32
j = L:GetTextBoundsAsync(X)
return j.X, j.Y
end
f.MouseIsOverFrame = function(L, L, X)
local V, K = L.AbsolutePosition, L.AbsoluteSize
return X.X >= V.X and X.X <= V.X + K.X and X.Y >= V.Y and X.Y <= V.Y + K.Y
end
f.SafeCallback = function(L, X, ...)
if not(X and typeof(X) == "function") then return
end
L = table.pack(xpcall(X, function(X)
task.defer(error, debug.traceback(X, 2))
if f.NotifyOnError then
f:Notify(X)
end
return X
end, ...))
if not L[1] then
return nil
end
return table.unpack(L, 2, L.n)
end
f.MakeDraggable = function(L, L, X, V, K)
local j, O
local m, k = false
X.InputBegan:Connect(function(X)
if not a(X) or K and f.CantDragForced then return
end
j = X.Position
O, m = L.Position, true
k = X.Changed:Connect(function()
if X.UserInputState ~= Enum.UserInputState.End then return
end
m = false
if k and k.Connected then
k:Disconnect()
k = nil
end
end)
end)
f:GiveSignal(U.InputChanged:Connect(function(X)
if not V and not f.Toggled or K and f.CantDragForced or not(b and b.Parent) then m = false
if k and k.Connected then
k:Disconnect()
k = nil
end
return
end
if m and(t(X)) then
local V = X.Position -j
L.Position = UDim2.new(O.X.Scale, O.X.Offset + V.X, O.Y.Scale, O.Y.Offset + V.Y)
end
end))
end
f.MakeResizable = function(L, L, X, V)
local K, j
local O, m = false
X.InputBegan:Connect(function(X)
if not a(X) then return
end
K = X.Position
j, O = L.Size, true
m = X.Changed:Connect(function()
if X.UserInputState ~= Enum.UserInputState.End then return
end
O = false
if m and m.Connected then
m:Disconnect()
m = nil
end
end)
end)
f:GiveSignal(U.InputChanged:Connect(function(X)
if not L.Visible or not(b and b.Parent) then O = false
if m and m.Connected then
m:Disconnect()
m = nil
end
return
end
if O and(t(X)) then
local O = X.Position -K
L.Size = UDim2.new(j.X.Scale, math.clamp(j.X.Offset + O.X, f.MinSize.X, math.huge), j.Y.Scale, math.clamp(j.Y.Offset + O.Y, f.MinSize.Y, math.huge))
if V then
f:SafeCallback(V)
end
end
end))
end
f.MakeCover = function(L, L, X)
local V, K = Q[X] or{0, 0}, v[X] or{1, 0.5}
return(F("Frame", {AnchorPoint = Vector2.new(V[1], V[2]), BackgroundColor3 = L.BackgroundColor3, Position = UDim2.fromScale(V[1], V[2]), Size = UDim2.fromScale(K[1], K[2]), Parent = L}))
end
f.MakeLine = function(L, L, Q)
return(F("Frame", {AnchorPoint = Q.AnchorPoint or Vector2.zero, BackgroundColor3 = "OutlineColor", Position = Q.Position, Size = Q.Size, ZIndex = Q.ZIndex or L.ZIndex, Parent = L}))
end
f.AddOutline = function(L, L)
return F("UIStroke", {Color = "OutlineColor", Thickness = 1, ZIndex = 2, Parent = L}), (F("UIStroke", {Color = "DarkColor", Thickness = 0, ZIndex = 1, Parent = L}))
end
f.AddBlank = function(L, L, Q)
return F("Frame", {BackgroundTransparency = 1, Size = Q or(UDim2.fromScale(0, 0)), Parent = L})
end
f.MakeOutline = function(L, Q, v, X)
warn("Obsidian is deprecated, please use Obsidian instead.")
L = F("Frame", {BackgroundColor3 = "DarkColor", Position = UDim2.fromOffset(- 2, -2), Size = UDim2.new(1, 4, 1, 4), ZIndex = X, Parent = Q})
Q = F("Frame", {BackgroundColor3 = "OutlineColor", Position = UDim2.fromOffset(1, 1), Size = UDim2.new(1, -2, 1, -2), ZIndex = X, Parent = L})
if v and v > 0 then
F("UICorner", {CornerRadius = UDim.new(0, v + 1), Parent = L})
F("UICorner", {CornerRadius = UDim.new(0, v), Parent = Q})
end
return L, Q
end
f.AddDraggableLabel = function(L, L)
local Q, v = {}, F("TextLabel", {AutomaticSize = Enum.AutomaticSize.XY, BackgroundColor3 = "BackgroundColor", Size = UDim2.fromOffset(0, 0), Position = UDim2.fromOffset(6, 6), Text = L, TextSize = 15, ZIndex = 10, Parent = b})
F("UICorner", {CornerRadius = UDim.new(0, f.CornerRadius), Parent = v})
F("UIPadding", {PaddingBottom = UDim.new(0, 6), PaddingLeft = UDim.new(0, 12), PaddingRight = UDim.new(0, 12), PaddingTop = UDim.new(0, 6), Parent = v})
table.insert(f.Scales, F("UIScale", {Parent = v}))
f:AddOutline(v)
f:MakeDraggable(v, v, true)
Q.Label = v
Q.SetText = function(L, L)
pcall(function()
v.Text = L
end)
end
Q.SetVisible = function(L, L)
pcall(function()
v.Visible = L
end)
end
return Q
end
f.AddDraggableButton = function(L, L, Q, v)
local X, V = {}, F("TextButton", {BackgroundColor3 = "BackgroundColor", Position = UDim2.fromOffset(6, 6), TextSize = 16, ZIndex = 10, Parent = b})
F("UICorner", {CornerRadius = UDim.new(0, f.CornerRadius), Parent = V})
if not v then
table.insert(f.Scales, F("UIScale", {Parent = V}))
end
f:AddOutline(V)
V.MouseButton1Click:Connect(function()
f:SafeCallback(Q, X)
end)
f:MakeDraggable(V, V, true)
X.Button = V
X.SetText = function(Q, Q)
local v, K = f:GetTextBounds(Q, f.Scheme.Font, 16)
V.Text = Q
V.Size = UDim2.fromOffset(v * 2, K * 2)
end
X:SetText(L)
return X
end
f.AddDraggableMenu = function(L, Q)
L = F("Frame", {AutomaticSize = Enum.AutomaticSize.XY, BackgroundColor3 = "BackgroundColor", Position = UDim2.fromOffset(6, 6), Size = UDim2.fromOffset(0, 0), ZIndex = 10, Parent = b})
F("UICorner", {CornerRadius = UDim.new(0, f.CornerRadius), Parent = L})
table.insert(f.Scales, F("UIScale", {Parent = L}))
f:AddOutline(L)
f:MakeLine(L, {Position = UDim2.fromOffset(0, 34), Size = UDim2.new(1, 0, 0, 1)})
local v = F("TextLabel", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 34), Text = Q, TextSize = 15, TextXAlignment = Enum.TextXAlignment.Left, Parent = L})
F("UIPadding", {PaddingLeft = UDim.new(0, 12), PaddingRight = UDim.new(0, 12), Parent = v})
Q = F("Frame", {BackgroundTransparency = 1, Position = UDim2.fromOffset(0, 35), Size = UDim2.new(1, 0, 1, -35), Parent = L})
F("UIListLayout", {Padding = UDim.new(0, 7), Parent = Q})
F("UIPadding", {PaddingBottom = UDim.new(0, 7), PaddingLeft = UDim.new(0, 7), PaddingRight = UDim.new(0, 7), PaddingTop = UDim.new(0, 7), Parent = Q})
f:MakeDraggable(L, v, true)
return L, Q
end
f.CreateFloatingPanel = function(L, Q)
Q = Q or{}
local v, X, V, K, j, O = Q.Title or "Panel", Q.Width or 580, Q.Height or 380, Q.Position or(UDim2.fromOffset(200, 100)), Q.SidebarWidth or 140, {Tabs = {}, ActiveTab = nil, TabOrder = {}}
local Q = F("TextButton", {BackgroundColor3 = function()
return f:GetBetterColor(f.Scheme.BackgroundColor, -1)
end, Text = "", AutoButtonColor = false, BorderSizePixel = 0, Position = K, Size = UDim2.fromOffset(X, V), ClipsDescendants = true, Visible = false, ZIndex = 100, Parent = b})
F("UICorner", {CornerRadius = UDim.new(0, f.CornerRadius), Parent = Q})
table.insert(f.Scales, F("UIScale", {Parent = Q}))
F("UIStroke", {Color = "AccentColor", Transparency = 0.7, Thickness = 1, Parent = Q})
f:AddOutline(Q)
V = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 36), Parent = Q})
f:MakeDraggable(Q, V, true)
f:MakeLine(Q, {Position = UDim2.fromOffset(0, 36), Size = UDim2.new(1, 0, 0, 1)})
X = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(0, j, 1, 0), Parent = V})
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Center, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 6), Parent = X})
local K = F("TextLabel", {BackgroundTransparency = 1, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.new(0, 0, 1, 0), Text = v, TextSize = 15, Parent = X})
f:AddToRegistry(K, {TextColor3 = "FontColor"})
L = F("Frame", {AnchorPoint = Vector2.new(1, 0.5), BackgroundTransparency = 1, Position = UDim2.new(1, -8, 0.5, 0), Size = UDim2.new(1, -j -16, 0, 20), Parent = V})
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 4), Parent = L})
local v = F("TextLabel", {BackgroundTransparency = 1, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.new(0, 0, 1, 0), Text = "", TextSize = 12, TextTransparency = 0.5, Parent = L})
f:AddToRegistry(v, {TextColor3 = "FontColor"})
local X = F("TextButton", {BackgroundTransparency = 1, Size = UDim2.fromOffset(36, 36), AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, 0, 0, 0), Text = "X", TextSize = 14, Parent = V})
f:AddToRegistry(X, {TextColor3 = "FontColor"})
X.MouseEnter:Connect(function()
pcall(function()
X.TextColor3 = f.Scheme.RedColor
end)
end)
X.MouseLeave:Connect(function()
pcall(function()
X.TextColor3 = f.Scheme.FontColor
end)
end)
X.MouseButton1Click:Connect(function()
Q.Visible = false
end)
L = F("Frame", {BackgroundColor3 = "BackgroundColor", Position = UDim2.fromOffset(0, 37), Size = UDim2.new(0, j, 1, -37), Parent = Q})
local X = F("ScrollingFrame", {BackgroundTransparency = 1, Size = UDim2.fromScale(1, 1), CanvasSize = UDim2.fromScale(0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 2, ScrollBarImageTransparency = 0.6, Parent = L})
F("UIListLayout", {Padding = UDim.new(0, 2), Parent = X})
F("UIPadding", {PaddingTop = UDim.new(0, 6), PaddingBottom = UDim.new(0, 6), PaddingLeft = UDim.new(0, 6), PaddingRight = UDim.new(0, 6), Parent = X})
F("Frame", {BackgroundColor3 = "OutlineColor", Position = UDim2.new(0, j, 0, 37), Size = UDim2.new(0, 1, 1, -37), Parent = Q})
local L = F("ScrollingFrame", {BackgroundTransparency = 1, Position = UDim2.fromOffset(j + 1, 37), Size = UDim2.new(1, -j -1, 1, -37), CanvasSize = UDim2.fromScale(0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 3, ScrollBarImageTransparency = 0.4, Parent = Q})
f:AddToRegistry(L, {ScrollBarImageColor3 = "AccentColor"})
F("UIPadding", {PaddingTop = UDim.new(0, 10), PaddingBottom = UDim.new(0, 10), PaddingLeft = UDim.new(0, 12), PaddingRight = UDim.new(0, 12), Parent = L})
O.Frame = Q
O.SetVisible = function(V, V)
Q.Visible = V
end
O.Toggle = function(V)
Q.Visible = not Q.Visible
end
O.SetTitle = function(Q, Q)
K.Text = Q
end
O.AddTab = function(Q, V, K)
local j = F("TextButton", {BackgroundColor3 = "MainColor", BackgroundTransparency = 1, AutoButtonColor = false, BorderSizePixel = 0, Size = UDim2.new(1, 0, 0, 28), Text = "", Parent = X})
F("UICorner", {CornerRadius = UDim.new(0, f.CornerRadius / 2), Parent = j})
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 6), Parent = j})
F("UIPadding", {PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), Parent = j})
Q = K and(f:GetIcon(K))
if Q then
K = F("ImageLabel", {BackgroundTransparency = 1, Size = UDim2.fromOffset(14, 14), Image = Q.Url or Q, Parent = j})
if Q.ImageRectOffset then
K.ImageRectOffset = Q.ImageRectOffset
end
if Q.ImageRectSize then
K.ImageRectSize = Q.ImageRectSize
end
f:AddToRegistry(K, {ImageColor3 = "FontColor"})
end
Q = F("TextLabel", {BackgroundTransparency = 1, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.new(0, 0, 1, 0), Text = V, TextSize = 12, TextXAlignment = Enum.TextXAlignment.Left, Parent = j})
f:AddToRegistry(Q, {TextColor3 = "FontColor"})
K = F("Frame", {BackgroundColor3 = "AccentColor", Position = UDim2.fromOffset(0, 0), Size = UDim2.new(0, 3, 1, 0), Visible = false, Parent = j})
F("UICorner", {CornerRadius = UDim.new(0, 2), Parent = K})
local X = F("ScrollingFrame", {BackgroundTransparency = 1, Size = UDim2.fromScale(1, 1), CanvasSize = UDim2.fromScale(0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ScrollBarThickness = 3, ScrollBarImageTransparency = 0.4, BorderSizePixel = 0, Visible = false, Parent = L})
f:AddToRegistry(X, {ScrollBarImageColor3 = "AccentColor"})
local L = F("Frame", {BackgroundTransparency = 1, Size = UDim2.fromScale(1, 0), AutomaticSize = Enum.AutomaticSize.Y, Parent = X})
F("UIListLayout", {Padding = UDim.new(0, 8), Parent = L})
F("UIPadding", {PaddingBottom = UDim.new(0, 7), PaddingLeft = UDim.new(0, 7), PaddingRight = UDim.new(0, 7), PaddingTop = UDim.new(0, 7), Parent = L})
local m = {Container = L, Holder = L, Tab = {}, DependencyBoxes = {}, Elements = {}, Resize = function(k)
end
}
setmetatable(m, f.BaseGroupbox)
L = {Name = V, Button = j, Label = Q, AccentLine = K, Scroll = X, Groupbox = m, Container = X}
j.MouseEnter:Connect(function()
if O.ActiveTab ~= V then j.BackgroundTransparency = 0.7
end
end)
j.MouseLeave:Connect(function()
if O.ActiveTab ~= V then j.BackgroundTransparency = 1
end
end)
j.MouseButton1Click:Connect(function()
O:SwitchTab(V)
end)
table.insert(O.TabOrder, V)
O.Tabs[V] = L
if not O.ActiveTab then
O:SwitchTab(V)
end
return m
end
O.SwitchTab = function(L, Q)
for X, V in pairs(O.Tabs) do
L = X == Q
V.Container.Visible = L
V.AccentLine.Visible = L
V.Button.BackgroundTransparency = L and 0 or 1
V.Label.TextTransparency = L and 0 or 0.4
end
v.Text = Q
O.ActiveTab = Q
end
return O
end
do
local L = f:AddDraggableLabel("")
L:SetVisible(false)
f.SetWatermark = function(Q, Q)
warn("Watermark is deprecated, please use Library instead.")
L:SetText(Q)
end
f.SetWatermarkVisibility = function(Q, Q)
warn("Watermark is deprecated, please use Library instead.")
L:SetVisible(Q)
end
end
local L
local function Q()
return f.Window and f.Window.Frame
end
f.AddContextMenu = function(v, v, X, V, K, j)
local O
if K then
O = F("ScrollingFrame", {AutomaticCanvasSize = K == 2 and Enum.AutomaticSize.Y or Enum.AutomaticSize.None, AutomaticSize = K == 1 and Enum.AutomaticSize.Y or Enum.AutomaticSize.None, BackgroundColor3 = "BackgroundColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png", CanvasSize = UDim2.fromOffset(0, 0), ClipsDescendants = true, ScrollBarImageColor3 = "OutlineColor", ScrollBarThickness = K == 2 and 2 or 0, Size = typeof(X) == "function" and(X()) or X, TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png", Visible = false, ZIndex = 50, Parent = b})
else
O = F("Frame", {BackgroundColor3 = "BackgroundColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, ClipsDescendants = true, Size = typeof(X) == "function" and(X()) or X, Visible = false, ZIndex = 50, Parent = b})
end
table.insert(f.Scales, F("UIScale", {Parent = O}))
local m = {Active = false, Holder = v, Menu = O, List = nil, Signal = nil, ScrollConns = {}, Size = X}
if K then
m.List = F("UIListLayout", {Parent = O})
end
local function X()
if typeof(V) == "function" then local K = V()
return K[1] or 0, K[2] or 0
end
return V[1], V[2]
end
local function V()
local K, k = X()
local X, n = v.AbsolutePosition.X + K, v.AbsolutePosition.Y + k
O.Size = typeof(m.Size) == "function" and(m.Size()) or m.Size
k = Q()
if k and k.Parent then
local K, E, S, G = k.AbsolutePosition, k.AbsoluteSize, O.AbsoluteSize.X, O.AbsoluteSize.Y
S, G = if S <= 0 and O.Size.X.Offset > 0 then O.Size.X.Offset * f.DPIScale else S, if G <= 0 and O.Size.Y.Offset > 0 then O.Size.Y.Offset * f.DPIScale else G
local k, y = n + G, K.Y
n, X = if G > 0 then(math.clamp(if k > y + E.Y then v.AbsolutePosition.Y -G -2 else n, K.Y, math.max(K.Y, K.Y + E.Y -G))) else
if k > y + E.Y then
v.AbsolutePosition.Y -G -2
else
n, if S > 0 then(math.clamp(X, K.X, math.max(K.X, K.X + E.X -S))) else X
end
O.Position = UDim2.fromOffset(math.floor(X), math.floor(n))
end
m.UnbindScrollClose = function(X)
for X, X in ipairs(m.ScrollConns) do
pcall(function()
X:Disconnect()
end)
end
table.clear(m.ScrollConns)
end
m.BindScrollClose = function(X)
m:UnbindScrollClose()
local X, K = v.Parent, Q()
while X and X ~= b do
if X:IsA("ScrollingFrame") then
table.insert(m.ScrollConns, X:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
m:Close()
end))
end
if X == K then
break
end
X = X.Parent
end
end
m.Open = function(Q)
if L == m then return
elseif L then
L:Close()
end
L = m
m.Active = true
V()
if typeof(j) == "function" then
f:SafeCallback(j, true)
end
O.Visible = true
m:BindScrollClose()
m.Signal = v:GetPropertyChangedSignal("AbsolutePosition"):Connect(V)
end
m.Close = function(Q)
if L ~= m then return
end
O.Visible = false
if m.Signal then
m.Signal:Disconnect()
m.Signal = nil
end
m:UnbindScrollClose()
m.Active = false
L = nil
if typeof(j) == "function" then
f:SafeCallback(j, false)
end
end
m.Toggle = function(Q)
if m.Active then m:Close()
else
m:Open()
end
end
m.SetSize = function(Q, Q)
m.Size = Q
O.Size = typeof(Q) == "function" and(Q()) or Q
if m.Active then
V()
end
end
m.Destroy = function(Q)
m:Close()
m:UnbindScrollClose()
Q = L
if Q == m then
L = nil
end
for v = #f.Scales, 1, -1 do
Q = f.Scales[v]
if Q and Q.Parent == O then
table.remove(f.Scales, v)
end
end
pcall(function()
O:Destroy()
end)
end
return m
end
f:GiveSignal(U.InputBegan:Connect(function(Q)
if f.Unloaded then return
end
if a(Q, true) then
local v = Q.Position
if L and not(f:MouseIsOverFrame(L.Menu, v) or(f:MouseIsOverFrame(L.Holder, v))) then
L:Close()
end
end
end))
local Q = F("TextLabel", {AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = "BackgroundColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, TextSize = 14, TextWrapped = true, Visible = false, ZIndex = 20, Parent = b})
F("UIPadding", {PaddingBottom = UDim.new(0, 2), PaddingLeft = UDim.new(0, 4), PaddingRight = UDim.new(0, 4), PaddingTop = UDim.new(0, 2), Parent = Q})
table.insert(f.Scales, (F("UIScale", {Parent = Q})))
Q:GetPropertyChangedSignal("AbsolutePosition"):Connect(function()
if f.Unloaded then return
end
local v = f:GetTextBounds(Q.Text, Q.FontFace, Q.TextSize, (workspace.CurrentCamera.ViewportSize.X -Q.AbsolutePosition.X -8) / f.DPIScale)
Q.Size = UDim2.fromOffset(v + 8)
end)
local v
f.AddTooltip = function(X, X, V, K)
local j = {Disabled = false, Hovering = false, Signals = {}}
local function O()
if v == K or L and(f:MouseIsOverFrame(L.Menu, C)) or j.Disabled and typeof(V) ~= "string" or not j.Disabled and typeof(X) ~= "string" then return
end
v = K
Q.Text = j.Disabled and V or X
Q.Visible = true
while f.Toggled and(f:MouseIsOverFrame(K, C)) and not(L and(f:MouseIsOverFrame(L.Menu, C))) do
Q.Position = UDim2.fromOffset(C.X + (f.ShowCustomCursor and 8 or 14), C.Y + (f.ShowCustomCursor and 8 or 12))
q.RenderStepped:Wait()
end
Q.Visible = false
v = nil
end
local function L(X)
local V = typeof(X)
if X and(V == "RBXScriptConnection" or V == "RBXScriptSignal") then
table.insert(j.Signals, X)
end
return X
end
L(K.MouseEnter:Connect(O))
L(K.MouseMoved:Connect(O))
L(K.MouseLeave:Connect(function()
if v ~= K then return
end
Q.Visible = false
v = nil
end))
j.Destroy = function(L)
for X = #j.Signals, 1, -1 do
L = table.remove(j.Signals, X)
if L and L.Connected then
L:Disconnect()
end
end
if v == K then
if Q then
Q.Visible = false
end
v = nil
end
end
table.insert(P, Q)
return j
end
f.OnUnload = function(L, L)
table.insert(f.UnloadSignals, L)
end
f.Unload = function(L)
for v = #f.Signals, 1, -1 do
L = table.remove(f.Signals, v)
if L and L.Connected then
L:Disconnect()
end
end
for L, L in pairs(f.UnloadSignals) do
f:SafeCallback(L)
end
for L, L in pairs(P) do
f:SafeCallback(L.Destroy, L)
end
f.Unloaded = true
b:Destroy()
R().YabujinLibrary = nil
end
local L, P, v, X, V = f:GetIcon("check"), f:GetIcon("chevron-up"), f:GetIcon("move-diagonal-2"), f:GetIcon("key"), f:GetIcon("move")
f.SetIconModule = function(K, K)
I, x = true, K
L = f:GetIcon("check")
P = f:GetIcon("chevron-up")
v = f:GetIcon("move-diagonal-2")
X = f:GetIcon("key")
V = f:GetIcon("move")
end
local I = {}
do
local x, K = {AddKeyPicker = function(j, O, m)
m = f:Validate(m, l.KeyPicker)
local k = j
local n, E = k.TextLabel, {Text = m.Text, Value = m.Default, Modifiers = m.DefaultModifiers, DisplayValue = m.Default, Toggled = false, Mode = m.Mode, SyncToggleState = m.SyncToggleState, Callback = m.Callback, ChangedCallback = m.ChangedCallback, Changed = m.Changed, Clicked = m.Clicked, Type = "KeyPicker"}
if E.Mode == "Press" then
assert(k.Type == "Label", "KeyPicker with the mode 'Press' can be only applied on Labels.")
E.SyncToggleState = false
m.Modes = {"Press"}
m.Mode = "Press"
end
if E.SyncToggleState then
m.Modes = {"Toggle", "Hold"}
if not table.find(m.Modes, m.Mode) then
m.Mode = "Toggle"
end
end
local S, G, y, i, T = false, {MB1 = Enum.UserInputType.MouseButton1, MB2 = Enum.UserInputType.MouseButton2, MB3 = Enum.UserInputType.MouseButton3}, {[Enum.UserInputType.MouseButton1] = "MB1", [Enum.UserInputType.MouseButton2] = "MB2", [Enum.UserInputType.MouseButton3] = "MB3"}, {LAlt = Enum.KeyCode.LeftAlt, RAlt = Enum.KeyCode.RightAlt, LCtrl = Enum.KeyCode.LeftControl, RCtrl = Enum.KeyCode.RightControl, LShift = Enum.KeyCode.LeftShift, RShift = Enum.KeyCode.RightShift, Tab = Enum.KeyCode.Tab, CapsLock = Enum.KeyCode.CapsLock}, {[Enum.KeyCode.LeftAlt] = "LAlt", [Enum.KeyCode.RightAlt] = "RAlt", [Enum.KeyCode.LeftControl] = "LCtrl", [Enum.KeyCode.RightControl] = "RCtrl", [Enum.KeyCode.LeftShift] = "LShift", [Enum.KeyCode.RightShift] = "RShift", [Enum.KeyCode.Tab] = "Tab", [Enum.KeyCode.CapsLock] = "CapsLock"}
local function MJ(bJ)
return bJ.UserInputType == Enum.UserInputType.Keyboard and T[bJ.KeyCode] ~= nil
end
local function bJ()
local JJ = {}
for NJ, AJ in pairs(i) do
if not table.find(JJ, NJ) and(U:IsKeyDown(AJ)) then
table.insert(JJ, NJ)
end
end
return JJ
end
local function JJ(NJ)
if not(typeof(NJ) == "table" and p(NJ) > 0) then return true
end
local AJ, qJ = bJ(), true
for bJ, bJ in pairs(NJ) do
if not table.find(AJ, bJ) then
qJ = false
break
end
end
return qJ
end
local function bJ(NJ)
if not NJ then return false
end
if y[NJ.UserInputType] ~= nil then
return U:IsMouseButtonPressed(NJ.UserInputType) and not U:GetFocusedTextBox()
elseif NJ.UserInputType == Enum.UserInputType.Keyboard then
return U:IsKeyDown(NJ.KeyCode) and not U:GetFocusedTextBox()
else
return false
end
end
local function NJ(AJ)
local qJ = {}
for WJ, WJ in pairs(AJ) do
table.insert(qJ, i[WJ])
end
return qJ
end
local function AJ(qJ)
if typeof(qJ) ~= "table" then return{}
end
local WJ = {}
for UJ, UJ in pairs(qJ) do
if i[UJ] then
table.insert(WJ, UJ)
end
end
return WJ
end
E.Modifiers = AJ(E.Modifiers)
local i, qJ = F("TextButton", {BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Size = UDim2.fromOffset(18, 18), Text = E.Value, TextSize = 14, Parent = n}), {Normal = E.Mode ~= "Toggle"}
do
local WJ = F("TextButton", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 16), Text = "", Visible = not m.NoUI, Parent = f.KeybindContainer})
local UJ, LJ = F("TextLabel", {AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, Size = UDim2.fromScale(0, 1), Text = "", TextSize = 14, TextTransparency = 0.5, Parent = WJ}), F("Frame", {AnchorPoint = Vector2.new(0, 0.5), BackgroundColor3 = "MainColor", Position = UDim2.fromScale(0, 0.5), Size = UDim2.fromOffset(14, 14), SizeConstraint = Enum.SizeConstraint.RelativeYY, Parent = WJ})
F("UICorner", {CornerRadius = UDim.new(0, f.CornerRadius / 2), Parent = LJ})
F("UIStroke", {Color = "OutlineColor", Parent = LJ})
local hJ = F("ImageLabel", {Image = L and L.Url or "", ImageColor3 = "FontColor", ImageRectOffset = L and L.ImageRectOffset or Vector2.zero, ImageRectSize = L and L.ImageRectSize or Vector2.zero, ImageTransparency = 1, Position = UDim2.fromOffset(2, 2), Size = UDim2.new(1, -4, 1, -4), Parent = LJ})
qJ.Display = function(BJ, BJ)
UJ.TextTransparency = BJ and 0 or 0.5
hJ.ImageTransparency = BJ and 0 or 1
end
qJ.SetText = function(hJ, hJ)
UJ.Text = hJ
end
qJ.SetVisibility = function(hJ, hJ)
WJ.Visible = hJ
end
qJ.SetNormal = function(hJ, BJ)
qJ.Normal = BJ
hJ = not BJ
WJ.Active = hJ
UJ.Position = BJ and(UDim2.fromOffset(0, 0)) or(UDim2.fromOffset(22, 0))
LJ.Visible = hJ
end
E.DoClick = function(...)
end
WJ.MouseButton1Click:Connect(function()
if qJ.Normal then return
end
E.Toggled = not E.Toggled
E:DoClick()
end)
qJ.Holder = WJ
qJ.Label = UJ
qJ.Checkbox = LJ
qJ.Loaded = true
table.insert(f.KeybindToggles, qJ)
end
local WJ = f:AddContextMenu(i, UDim2.fromOffset(62, 0), function()
return{i.AbsoluteSize.X + 1.5, 0.5}
end, 1)
E.Menu = WJ
local UJ = {}
for LJ, LJ in pairs(m.Modes) do
local hJ, BJ = {}, F("TextButton", {BackgroundColor3 = "MainColor", BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 21), Text = LJ, TextSize = 14, TextTransparency = 0.5, Parent = WJ.Menu})
hJ.Select = function(RJ)
for RJ, RJ in pairs(UJ) do
RJ:Deselect()
end
E.Mode = LJ
BJ.BackgroundTransparency = 0
BJ.TextTransparency = 0
WJ:Close()
end
hJ.Deselect = function(RJ)
E.Mode = nil
BJ.BackgroundTransparency = 1
BJ.TextTransparency = 0.5
end
BJ.MouseButton1Click:Connect(function()
hJ:Select()
end)
if E.Mode == LJ then
hJ:Select()
end
UJ[LJ] = hJ
end
E.Display = function(LJ, LJ)
if f.Unloaded then return
end
local hJ, BJ = f:GetTextBounds(LJ or E.DisplayValue, i.FontFace, i.TextSize, n.AbsoluteSize.X)
i.Text = LJ or E.DisplayValue
i.Size = UDim2.fromOffset(hJ + 9, BJ + 4)
end
E.Update = function(n)
E:Display()
if m.NoUI then
return
end
if E.Mode == "Toggle" and k.Type == "Toggle" and k.Disabled then
qJ:SetVisibility(false)
return
end
local n, LJ = E:GetState(), f.ShowToggleFrameInKeybinds and E.Mode == "Toggle"
if E.SyncToggleState and k.Value ~= n then
k:SetValue(n)
end
if qJ.Loaded then
if LJ then
qJ:SetNormal(false)
else
qJ:SetNormal(true)
end
qJ:SetText(("[%s] %s (%s)"):format(E.DisplayValue, E.Text, E.Mode))
qJ:SetVisibility(true)
qJ:Display(n)
end
end
E.GetState = function(n)
if E.Mode == "Always" then return true
elseif E.Mode == "Hold" then
n = E.Value
if n == "None" then
return false
end
if not JJ(E.Modifiers) then
return false
end
if G[n] ~= nil then
return U:IsMouseButtonPressed(G[n]) and not U:GetFocusedTextBox()
else
return U:IsKeyDown(Enum.KeyCode[n]) and not U:GetFocusedTextBox()
end
else
return E.Toggled
end
end
E.OnChanged = function(n, n)
E.Changed = n
end
E.OnClick = function(n, n)
E.Clicked = n
end
E.DoClick = function(n)
if E.Mode == "Press" then
if E.Toggled and m.WaitForCallback == true then
return
end
E.Toggled = true
end
f:SafeCallback(E.Callback, E.Toggled)
f:SafeCallback(E.Clicked, E.Toggled)
if E.Mode == "Press" then
E.Toggled = false
end
end
E.SetValue = function(m, n)
local LJ, hJ, BJ = n[1], n[2], n[3]
m, n = pcall(function()
if LJ == "None" then LJ = nil
return nil
end
if G[LJ] == nil then
return Enum.KeyCode[LJ]
end
return G[LJ]
end)
if LJ == nil then
E.Value = "None"
elseif m then
E.Value = LJ
else
E.Value = "Unknown"
end
E.Modifiers = AJ(typeof(BJ) == "table" and BJ or E.Modifiers)
E.DisplayValue = p(E.Modifiers) > 0 and table.concat(E.Modifiers, " + ") .. " + " .. E.Value or E.Value
if UJ[hJ] then
UJ[hJ]:Select()
end
m = NJ(E.Modifiers)
f:SafeCallback(E.ChangedCallback, n, m)
f:SafeCallback(E.Changed, n, m)
E:Update()
end
E.SetText = function(m, m)
qJ:SetText(m)
E:Update()
end
i.MouseButton1Click:Connect(function()
if S then return
end
S = true
i.Text = "..."
i.Size = UDim2.fromOffset(29, 18)
local m
local n = {}
local function G()
m = U.InputBegan:Wait()
return U:GetFocusedTextBox() ~= nil
end
repeat
task.wait()
i.Text = "..."
i.Size = UDim2.fromOffset(29, 18)
if G() then
S = false
E:Update()
return
end
if m.KeyCode == Enum.KeyCode.Escape then
break
end
if MJ(m) then
local NJ = false
repeat
task.wait()
if U:IsKeyDown(m.KeyCode) then
task.wait(0.075)
if U:IsKeyDown(m.KeyCode) then
if not table.find(n, T[m.KeyCode]) then
n[#n + 1] = T[m.KeyCode]
E:Display(table.concat(n, " + ") .. " + ...")
end
local AJ = NJ
if G() then
NJ = true
break
end
if m.KeyCode == Enum.KeyCode.Escape then
NJ = AJ
break
end
if not MJ(m) then
NJ = AJ
break
end
elseif not table.find(n, T[m.KeyCode]) then
break
end
end
until false
if NJ then
S = false
E:Update()
return
end
end
break
until false
local G, T = if y[m.UserInputType] ~= nil then y[m.UserInputType] else
if m.UserInputType == Enum.UserInputType.Keyboard then
m.KeyCode == Enum.KeyCode.Escape and "None" or m.KeyCode.Name
else
"Unknown", {"Touch", "MB1", "MB2", "MB3", "W", "A", "S", "D", "Space", "LeftShift", "LeftControl"}
for MJ, MJ in pairs(T) do
if G == MJ then
f:Notify("Cant use " .. MJ .. " as keybind", 3)
S = false
E:Update()
return
end
end
n = (m.KeyCode == Enum.KeyCode.Escape or G == "Unknown") and{} or n
E.Toggled = false
E:SetValue({G, E.Mode, n})
repeat
task.wait()
until not bJ(m) or(U:GetFocusedTextBox())
S = false
end)
i.MouseButton2Click:Connect(WJ.Toggle)
f:GiveSignal(U.InputBegan:Connect(function(m)
if f.Unloaded then return
end
if E.Mode == "Always" or E.Value == "Unknown" or E.Value == "None" or S or(U:GetFocusedTextBox()) then
return
end
local n = E.Value
local G = if n and JJ(E.Modifiers) == true and(y[m.UserInputType] == n or m.UserInputType == Enum.UserInputType.Keyboard and m.KeyCode.Name == n) then true else false
if E.Mode == "Toggle" then
if G then
E.Toggled = not E.Toggled
E:DoClick()
end
elseif E.Mode == "Press" then
if G then
E:DoClick()
end
end
E:Update()
end))
f:GiveSignal(U.InputEnded:Connect(function()
if f.Unloaded then return
end
if E.Value == "Unknown" or E.Value == "None" or S or(U:GetFocusedTextBox()) then
return
end
E:Update()
end))
E:Update()
if k.Addons then
table.insert(k.Addons, E)
end
E.Default = E.Value
E.DefaultModifiers = table.clone(E.Modifiers or{})
z[O] = E
return j
end
}, {}
for j = 0, 1, 0.1 do
table.insert(K, ColorSequenceKeypoint.new(j, Color3.fromHSV(j, 1, 1)))
end
x.AddColorPicker = function(j, O, m)
m = f:Validate(m, l.ColorPicker)
local k, n = j.TextLabel, {Value = m.Default, Transparency = m.Transparency or 0, Title = m.Title, Callback = m.Callback, Changed = m.Changed, Type = "ColorPicker"}
n.Hue, n.Sat, n.Vib = n.Value:ToHSV()
local E = F("TextButton", {BackgroundColor3 = n.Value, BorderColor3 = f:GetDarkerColor(n.Value), BorderSizePixel = 1, Size = UDim2.fromOffset(18, 18), Text = "", Parent = k})
local S, G = F("ImageLabel", {Image = Y.GetAsset("TransparencyTexture"), ImageTransparency = 1 -n.Transparency, ScaleType = Enum.ScaleType.Tile, Size = UDim2.fromScale(1, 1), TileSize = UDim2.fromOffset(9, 9), Parent = E}), f:AddContextMenu(E, UDim2.fromOffset(m.Transparency and 256 or 234, 0), function()
return{0.5, E.AbsoluteSize.Y + 1.5}
end, 1)
G.List.Padding = UDim.new(0, 8)
n.ColorMenu = G
F("UIPadding", {PaddingBottom = UDim.new(0, 6), PaddingLeft = UDim.new(0, 6), PaddingRight = UDim.new(0, 6), PaddingTop = UDim.new(0, 6), Parent = G.Menu})
if typeof(n.Title) == "string" then
F("TextLabel", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 8), Text = n.Title, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left, Parent = G.Menu})
end
k = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 200), Parent = G.Menu})
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, Padding = UDim.new(0, 6), Parent = k})
local y = F("ImageButton", {BackgroundColor3 = n.Value, Image = Y.GetAsset("SaturationMap"), Size = UDim2.fromOffset(200, 200), Parent = k})
local i = F("Frame", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = "WhiteColor", Size = UDim2.fromOffset(6, 6), Parent = y})
F("UICorner", {CornerRadius = UDim.new(1, 0), Parent = i})
F("UIStroke", {Color = "DarkColor", Parent = i})
local T = F("TextButton", {Size = UDim2.fromOffset(16, 200), Text = "", Parent = k})
F("UIGradient", {Color = ColorSequence.new(K), Rotation = 90, Parent = T})
local K = F("Frame", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = "WhiteColor", BorderColor3 = "DarkColor", BorderSizePixel = 1, Position = UDim2.fromScale(0.5, n.Hue), Size = UDim2.new(1, 2, 0, 1), Parent = T})
local MJ, bJ, JJ
if m.Transparency then
MJ = F("ImageButton", {Image = Y.GetAsset("TransparencyTexture"), ScaleType = Enum.ScaleType.Tile, Size = UDim2.fromOffset(16, 200), TileSize = UDim2.fromOffset(8, 8), Parent = k})
bJ = F("Frame", {BackgroundColor3 = n.Value, Size = UDim2.fromScale(1, 1), Parent = MJ})
F("UIGradient", {Rotation = 90, Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 1)}), Parent = bJ})
JJ = F("Frame", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = "WhiteColor", BorderColor3 = "DarkColor", BorderSizePixel = 1, Position = UDim2.fromScale(0.5, n.Transparency), Size = UDim2.new(1, 2, 0, 1), Parent = MJ})
end
k = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 20), Parent = G.Menu})
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, HorizontalFlex = Enum.UIFlexAlignment.Fill, Padding = UDim.new(0, 8), Parent = k})
local Y, NJ, AJ = F("TextBox", {BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, ClearTextOnFocus = false, Size = UDim2.fromScale(1, 1), Text = "#??????", TextSize = 14, Parent = k}), F("TextBox", {BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, ClearTextOnFocus = false, Size = UDim2.fromScale(1, 1), Text = "?, ?, ?", TextSize = 14, Parent = k}), f:AddContextMenu(E, UDim2.fromOffset(93, 0), function()
return{E.AbsoluteSize.X + 1.5, 0.5}
end, 1)
n.ContextMenu = AJ
local function k(qJ, WJ)
F("TextButton", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 21), Text = qJ, TextSize = 14, Parent = AJ.Menu}).MouseButton1Click:Connect(function()
f:SafeCallback(WJ)
AJ:Close()
end)
end
k("Copy color", function()
f.CopiedColor = {n.Value, n.Transparency}
end)
n.SetValueRGB = function(...)
end
k("Paste color", function()
n:SetValueRGB(f.CopiedColor[1], f.CopiedColor[2])
end)
if s then
k("Copy Hex", function()
s(tostring(n.Value:ToHex()))
end)
k("Copy RGB", function()
s(table.concat({math.floor(n.Value.R * 255), math.floor(n.Value.G * 255), math.floor(n.Value.B * 255)}, ", "))
end)
end
n.SetHSVFromRGB = function(s, s)
n.Hue, n.Sat, n.Vib = s:ToHSV()
end
n.Display = function(s)
if f.Unloaded then return
end
n.Value = Color3.fromHSV(n.Hue, n.Sat, n.Vib)
E.BackgroundColor3 = n.Value
E.BorderColor3 = f:GetDarkerColor(n.Value)
S.ImageTransparency = 1 -n.Transparency
y.BackgroundColor3 = Color3.fromHSV(n.Hue, 1, 1)
if bJ then
bJ.BackgroundColor3 = n.Value
end
i.Position = UDim2.fromScale(n.Sat, 1 -n.Vib)
K.Position = UDim2.fromScale(0.5, n.Hue)
if JJ then
JJ.Position = UDim2.fromScale(0.5, n.Transparency)
end
Y.Text = "#" .. n.Value:ToHex()
NJ.Text = table.concat({math.floor(n.Value.R * 255), math.floor(n.Value.G * 255), math.floor(n.Value.B * 255)}, ", ")
end
n.Update = function(s)
n:Display()
f:SafeCallback(n.Callback, n.Value)
f:SafeCallback(n.Changed, n.Value)
end
n.OnChanged = function(s, s)
n.Changed = s
end
n.SetValue = function(s, K, k)
if typeof(K) == "Color3" then n:SetValueRGB(K, k)
return
end
s = Color3.fromHSV(K[1], K[2], K[3])
n.Transparency = m.Transparency and k or 0
n:SetHSVFromRGB(s)
n:Update()
end
n.SetValueRGB = function(s, s, K)
n.Transparency = m.Transparency and K or 0
n:SetHSVFromRGB(s)
n:Update()
end
E.MouseButton1Click:Connect(G.Toggle)
E.MouseButton2Click:Connect(AJ.Toggle)
y.InputBegan:Connect(function(s)
while g(s) do
local s = y.AbsolutePosition.X
local K = s + y.AbsoluteSize.X
local m, k = math.clamp(C.X, s, K), y.AbsolutePosition.Y
local E = k + y.AbsoluteSize.Y
local S, G, y = math.clamp(C.Y, k, E), n.Sat, n.Vib
n.Sat = (m -s) / (K -s)
n.Vib = 1 -(S -k) / (E -k)
if n.Sat ~= G or n.Vib ~= y then
n:Update()
end
q.RenderStepped:Wait()
end
end)
T.InputBegan:Connect(function(s)
while g(s) do
local s = T.AbsolutePosition.Y
local K = s + T.AbsoluteSize.Y
local m, k = math.clamp(C.Y, s, K), n.Hue
n.Hue = (m -s) / (K -s)
if n.Hue ~= k then
n:Update()
end
q.RenderStepped:Wait()
end
end)
if MJ then
MJ.InputBegan:Connect(function(s)
while g(s) do
local s, K = MJ.AbsolutePosition.Y, MJ.AbsolutePosition.Y + MJ.AbsoluteSize.Y
local m, k = math.clamp(C.Y, s, K), n.Transparency
n.Transparency = (m -s) / (K -s)
if n.Transparency ~= k then
n:Update()
end
q.RenderStepped:Wait()
end
end)
end
Y.FocusLost:Connect(function(s)
if not s then return
end
local s, K = pcall(Color3.fromHex, Y.Text)
if s and typeof(K) == "Color3" then
n.Hue, n.Sat, n.Vib = K:ToHSV()
end
n:Update()
end)
NJ.FocusLost:Connect(function(s)
if not s then return
end
local s, Y, K = NJ.Text:match("(%d+),%s*(%d+),%s*(%d+)")
if s and Y and K then
n:SetHSVFromRGB(Color3.fromRGB(s, Y, K))
end
n:Update()
end)
n:Display()
if j.Addons then
table.insert(j.Addons, n)
end
n.Default = n.Value
z[O] = n
return j
end
x.AddInlineButton = function(s, Y)
Y = if typeof(Y) ~= "table" then{Text = tostring(Y or "")} else Y
local K = s.TextLabel
assert(K, "AddInlineButton can only be applied on Toggles or Labels.")
local j, O = {Text = Y.Text or "", Icon = Y.Icon, Func = Y.Func or Y.Callback or function()
end, Tooltip = Y.Tooltip, DisabledTooltip = Y.DisabledTooltip, TooltipTable = nil, Risky = Y.Risky or false, Disabled = Y.Disabled or false, Visible = Y.Visible ~= false, Tween = nil, Type = "InlineButton"}, Y.Size or 16
local m = F("TextButton", {Active = not j.Disabled, BackgroundColor3 = j.Disabled and "BackgroundColor" or "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Size = UDim2.fromOffset(O, O), Text = "", TextSize = 11, TextTransparency = j.Disabled and 0.8 or 0.35, Visible = j.Visible, Parent = K})
local K, O = F("UIStroke", {Color = "OutlineColor", Transparency = j.Disabled and 0.5 or 0, Parent = m}), false
if j.Icon then
Y = f:GetIcon(j.Icon)
if Y then
F("ImageLabel", {AnchorPoint = Vector2.new(0.5, 0.5), BackgroundTransparency = 1, Image = Y.Url or "", ImageColor3 = "FontColor", ImageRectOffset = Y.ImageRectOffset or Vector2.zero, ImageRectSize = Y.ImageRectSize or Vector2.zero, ImageTransparency = j.Disabled and 0.8 or 0.2, Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.new(1, -4, 1, -4), Parent = m})
O = true
end
end
if not O then
m.Text = j.Text
end
j.Base = m
j.Stroke = K
j.UpdateColors = function(Y)
if f.Unloaded then return
end
_(j.Tween)
m.BackgroundColor3 = j.Disabled and f.Scheme.BackgroundColor or f.Scheme.MainColor
m.TextTransparency = j.Disabled and 0.8 or 0.35
K.Transparency = j.Disabled and 0.5 or 0
m.Active = not j.Disabled
f.Registry[m].BackgroundColor3 = j.Disabled and "BackgroundColor" or "MainColor"
end
j.SetDisabled = function(Y, Y)
j.Disabled = Y
if j.TooltipTable then
j.TooltipTable.Disabled = j.Disabled
end
j:UpdateColors()
end
j.SetVisible = function(Y, Y)
j.Visible = Y
m.Visible = Y
end
j.SetText = function(Y, Y)
j.Text = Y
m.Text = Y
end
m.MouseEnter:Connect(function()
if j.Disabled then return
end
f:PlaySound("hover", 0.06, 1.5)
j.Tween = B:Create(m, f.TweenInfo, {TextTransparency = 0})
j.Tween:Play()
end)
m.MouseLeave:Connect(function()
if j.Disabled then return
end
j.Tween = B:Create(m, f.TweenInfo, {TextTransparency = 0.35})
j.Tween:Play()
end)
m.MouseButton1Click:Connect(function()
if j.Disabled then return
end
f:PlaySound("click", 0.12, 1)
f:SafeCallback(j.Func)
end)
if typeof(j.Tooltip) == "string" or typeof(j.DisabledTooltip) == "string" then
j.TooltipTable = f:AddTooltip(j.Tooltip, j.DisabledTooltip, m)
j.TooltipTable.Disabled = j.Disabled
end
if j.Risky then
m.TextColor3 = f.Scheme.RedColor
f.Registry[m].TextColor3 = "RedColor"
end
j:UpdateColors()
if s.Addons then
table.insert(s.Addons, j)
end
return j
end
I.__index = x
I.__namecall = function(s, s, ...)
return x[s](...)
end
end
local s = {}
do
local Y = {}
local function x(K)
f.Registry[K] = nil
for j, j in ipairs(K:GetDescendants()) do
f.Registry[j] = nil
end
end
Y.RemoveElement = function(K, j)
if not j then return
end
pcall(function()
if j.Menu and j.Menu.Destroy then j.Menu:Destroy()
end
end)
pcall(function()
if j.TooltipTable and j.TooltipTable.Destroy then j.TooltipTable:Destroy()
end
end)
local O = {H, z, J}
for m, m in ipairs(O) do
for O, k in pairs(m) do
if k == j then
m[O] = nil
end
end
end
local O = j.Holder or j.Base
if O then
pcall(function()
x(O)
end)
pcall(function()
O:Destroy()
end)
end
for x = #K.Elements, 1, -1 do
if K.Elements[x] == j then
table.remove(K.Elements, x)
end
end
pcall(function()
K:Resize()
end)
end
Y.Clear = function(x)
for K = #x.Elements, 1, -1 do
x:RemoveElement(x.Elements[K])
end
end
Y.AddDivider = function(x, K)
local j = x.Container
local O = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 6), Parent = j})
if K then
j = F("TextLabel", {AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, Size = UDim2.fromScale(1, 0), Text = K, TextSize = 14, TextTransparency = 0.5, TextXAlignment = Enum.TextXAlignment.Center, Parent = O})
local m = f:GetTextBounds(K, j.FontFace, j.TextSize, j.AbsoluteSize.X)
local K = math.floor(m / 2) + 10
F("Frame", {AnchorPoint = Vector2.new(0, 0.5), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Position = UDim2.fromScale(0, 0.5), Size = UDim2.new(0.5, -K, 0, 2), Parent = O})
F("Frame", {AnchorPoint = Vector2.new(1, 0.5), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Position = UDim2.fromScale(1, 0.5), Size = UDim2.new(0.5, -K, 0, 2), Parent = O})
else
F("Frame", {AnchorPoint = Vector2.new(0, 0.5), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Position = UDim2.fromScale(0, 0.5), Size = UDim2.new(1, 0, 0, 2), Parent = O})
end
x:Resize()
table.insert(x.Elements, {Holder = O, Type = "Divider"})
end
Y.AddLabel = function(x, ...)
local K, j, O = {}, select(1, ...), select(2, ...)
if typeof(j) == "table" or typeof(O) == "table" then
local m = typeof(j) == "table" and j or O
K.Text = m.Text or ""
K.DoesWrap = m.DoesWrap or false
K.Size = m.Size or 14
K.Visible = m.Visible or true
K.Idx = typeof(O) == "table" and j or nil
else
K.Text = j or ""
K.DoesWrap = O or false
K.Size = 14
K.Visible = true
K.Idx = select(3, ...) or nil
end
local j = x
local m, k = j.Container, {Text = K.Text, DoesWrap = K.DoesWrap, Addons = {}, Visible = K.Visible, Type = "Label"}
local n = F("TextLabel", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 18), Text = k.Text, TextSize = K.Size, TextWrapped = k.DoesWrap, TextXAlignment = j.IsKeyTab and Enum.TextXAlignment.Center or Enum.TextXAlignment.Left, Parent = m})
k.SetVisible = function(E, E)
k.Visible = E
n.Visible = k.Visible
j:Resize()
end
k.SetText = function(E, S)
k.Text = S
n.Text = S
if k.DoesWrap then
E, S = f:GetTextBounds(k.Text, n.FontFace, n.TextSize, n.AbsoluteSize.X)
n.Size = UDim2.new(1, 0, 0, S + 4)
end
j:Resize()
end
if k.DoesWrap then
O, x = f:GetTextBounds(k.Text, n.FontFace, n.TextSize, n.AbsoluteSize.X)
n.Size = UDim2.new(1, 0, 0, x + 4)
local x = n.AbsoluteSize
n:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
if n.AbsoluteSize == x then return
end
local O, O = f:GetTextBounds(k.Text, n.FontFace, n.TextSize, n.AbsoluteSize.X)
n.Size = UDim2.new(1, 0, 0, O + 4)
x = n.AbsoluteSize
j:Resize()
end)
else
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, Padding = UDim.new(0, 6), Parent = n})
end
j:Resize()
k.TextLabel = n
k.Container = m
if not K.DoesWrap then
setmetatable(k, I)
end
k.Holder = n
table.insert(j.Elements, k)
if K.Idx then
J[K.Idx] = k
else
table.insert(J, k)
end
return k
end
Y.AddButton = function(J, ...)
local function x(...)
local K, j, O = {}, select(1, ...), select(2, ...)
if typeof(j) == "table" or typeof(O) == "table" then
local m = typeof(j) == "table" and j or O
K.Text = m.Text or ""
K.Func = m.Func or m.Callback or function()
end
K.DoubleClick = m.DoubleClick
K.Tooltip = m.Tooltip
K.DisabledTooltip = m.DisabledTooltip
K.Risky = m.Risky or false
K.Disabled = m.Disabled or false
K.Visible = m.Visible or true
K.Idx = typeof(O) == "table" and j or nil
else
K.Text = j or ""
K.Func = O or function()
end
K.DoubleClick = false
K.Tooltip = nil
K.DisabledTooltip = nil
K.Risky = false
K.Disabled = false
K.Visible = true
K.Idx = select(3, ...) or nil
end
return K
end
local K, j = x(...), J
local J, O = j.Container, {Text = K.Text, Func = K.Func, DoubleClick = K.DoubleClick, Tooltip = K.Tooltip, DisabledTooltip = K.DisabledTooltip, TooltipTable = nil, Risky = K.Risky, Disabled = K.Disabled, Visible = K.Visible, Tween = nil, Type = "Button"}
local m = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 21), Parent = J})
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, HorizontalFlex = Enum.UIFlexAlignment.Fill, Padding = UDim.new(0, 9), Parent = m})
local function J(k)
local n = F("TextButton", {Active = not k.Disabled, BackgroundColor3 = k.Disabled and "BackgroundColor" or "MainColor", Size = UDim2.fromScale(1, 1), Text = k.Text, TextSize = 14, TextTransparency = 0.3, Visible = k.Visible, Parent = m})
return n, (F("UIStroke", {Color = "OutlineColor", Transparency = k.Disabled and 0.5 or 0, Parent = n}))
end
local function k(n)
n.Base.MouseEnter:Connect(function()
if n.Disabled then return
end
f:PlaySound("hover", 0.08, 1.5)
n.Tween = B:Create(n.Base, f.TweenInfo, {TextTransparency = 0})
n.Tween:Play()
end)
n.Base.MouseLeave:Connect(function()
if n.Disabled then return
end
n.Tween = B:Create(n.Base, f.TweenInfo, {TextTransparency = 0.4})
n.Tween:Play()
end)
n.Base.MouseButton1Click:Connect(function()
if n.Disabled or n.Locked then return
end
f:PlaySound("click", 0.15, 1)
if n.DoubleClick then
n.Locked = true
n.Base.Text = "Are you sure?"
n.Base.TextColor3 = f.Scheme.AccentColor
f.Registry[n.Base].TextColor3 = "AccentColor"
local E = Z(n.Base.MouseButton1Click, 0.5)
n.Base.Text = n.Text
n.Base.TextColor3 = n.Risky and f.Scheme.RedColor or f.Scheme.FontColor
f.Registry[n.Base].TextColor3 = n.Risky and "RedColor" or "FontColor"
if E then
f:SafeCallback(n.Func)
end
q.RenderStepped:Wait()
n.Locked = false
return
end
f:SafeCallback(n.Func)
end)
end
O.Base, O.Stroke = J(O)
k(O)
O.AddButton = function(Z, ...)
Z = x(...)
local x = {Text = Z.Text, Func = Z.Func, DoubleClick = Z.DoubleClick, Tooltip = Z.Tooltip, DisabledTooltip = Z.DisabledTooltip, TooltipTable = nil, Risky = Z.Risky, Disabled = Z.Disabled, Visible = Z.Visible, Tween = nil, Type = "SubButton"}
O.SubButton = x
x.Base, x.Stroke = J(x)
k(x)
x.UpdateColors = function(J)
if f.Unloaded then return
end
_(x.Tween)
x.Base.BackgroundColor3 = x.Disabled and f.Scheme.BackgroundColor or f.Scheme.MainColor
x.Base.TextTransparency = x.Disabled and 0.8 or 0.4
x.Stroke.Transparency = x.Disabled and 0.5 or 0
f.Registry[x.Base].BackgroundColor3 = x.Disabled and "BackgroundColor" or "MainColor"
end
x.SetDisabled = function(J, J)
x.Disabled = J
if x.TooltipTable then
x.TooltipTable.Disabled = x.Disabled
end
x.Base.Active = not x.Disabled
x:UpdateColors()
end
x.SetVisible = function(J, J)
x.Visible = J
x.Base.Visible = x.Visible
j:Resize()
end
x.SetText = function(J, J)
x.Text = J
x.Base.Text = J
end
if typeof(x.Tooltip) == "string" or typeof(x.DisabledTooltip) == "string" then
x.TooltipTable = f:AddTooltip(x.Tooltip, x.DisabledTooltip, x.Base)
x.TooltipTable.Disabled = x.Disabled
end
if x.Risky then
x.Base.TextColor3 = f.Scheme.RedColor
f.Registry[x.Base].TextColor3 = "RedColor"
end
x:UpdateColors()
if Z.Idx then
o[Z.Idx] = x
else
table.insert(o, x)
end
return x
end
O.UpdateColors = function(J)
if f.Unloaded then return
end
_(O.Tween)
O.Base.BackgroundColor3 = O.Disabled and f.Scheme.BackgroundColor or f.Scheme.MainColor
O.Base.TextTransparency = O.Disabled and 0.8 or 0.4
O.Stroke.Transparency = O.Disabled and 0.5 or 0
f.Registry[O.Base].BackgroundColor3 = O.Disabled and "BackgroundColor" or "MainColor"
end
O.SetDisabled = function(J, J)
O.Disabled = J
if O.TooltipTable then
O.TooltipTable.Disabled = O.Disabled
end
O.Base.Active = not O.Disabled
O:UpdateColors()
end
O.SetVisible = function(J, J)
O.Visible = J
m.Visible = O.Visible
j:Resize()
end
O.SetText = function(J, J)
O.Text = J
O.Base.Text = J
end
if typeof(O.Tooltip) == "string" or typeof(O.DisabledTooltip) == "string" then
O.TooltipTable = f:AddTooltip(O.Tooltip, O.DisabledTooltip, O.Base)
O.TooltipTable.Disabled = O.Disabled
end
if O.Risky then
O.Base.TextColor3 = f.Scheme.RedColor
f.Registry[O.Base].TextColor3 = "RedColor"
end
O:UpdateColors()
j:Resize()
O.Holder = m
table.insert(j.Elements, O)
if K.Idx then
o[K.Idx] = O
else
table.insert(o, O)
end
return O
end
Y.AddCheckbox = function(J, o, Z)
Z = f:Validate(Z, l.Toggle)
local _ = J
local J, x = _.Container, {Text = Z.Text, Value = Z.Default, Tooltip = Z.Tooltip, DisabledTooltip = Z.DisabledTooltip, TooltipTable = nil, Callback = Z.Callback, Changed = Z.Changed, Risky = Z.Risky, Disabled = Z.Disabled, Visible = Z.Visible, Addons = {}, Type = "Toggle"}
local Z = F("TextButton", {Active = not x.Disabled, BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 18), Text = "", Visible = x.Visible, Parent = J})
local K = F("TextLabel", {BackgroundTransparency = 1, Position = UDim2.fromOffset(26, 0), Size = UDim2.new(1, -26, 1, 0), Text = x.Text, TextSize = 14, TextTransparency = 0.4, TextXAlignment = Enum.TextXAlignment.Left, Parent = Z})
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, Padding = UDim.new(0, 6), Parent = K})
local j = F("Frame", {BackgroundColor3 = "MainColor", Size = UDim2.fromScale(1, 1), SizeConstraint = Enum.SizeConstraint.RelativeYY, Parent = Z})
F("UICorner", {CornerRadius = UDim.new(0, f.CornerRadius / 2), Parent = j})
local O, m = F("UIStroke", {Color = "OutlineColor", Parent = j}), F("ImageLabel", {Image = L and L.Url or "", ImageColor3 = "FontColor", ImageRectOffset = L and L.ImageRectOffset or Vector2.zero, ImageRectSize = L and L.ImageRectSize or Vector2.zero, ImageTransparency = 1, Position = UDim2.fromOffset(2, 2), Size = UDim2.new(1, -4, 1, -4), Parent = j})
x.UpdateColors = function(k)
x:Display()
end
x.Display = function(k)
if f.Unloaded then return
end
local function k()
O.Transparency = x.Disabled and 0.5 or 0
if x.Disabled then
K.TextTransparency = 0.8
m.ImageTransparency = x.Value and 0.8 or 1
j.BackgroundColor3 = f.Scheme.BackgroundColor
f.Registry[j].BackgroundColor3 = "BackgroundColor"
return
end
B:Create(K, f.TweenInfo, {TextTransparency = x.Value and 0 or 0.4}):Play()
B:Create(m, f.TweenInfo, {ImageTransparency = x.Value and 0 or 1}):Play()
j.BackgroundColor3 = f.Scheme.MainColor
f.Registry[j].BackgroundColor3 = "MainColor"
end
if yabujinCoreState and yabujinCoreState._withId then
yabujinCoreState._withId(k)
else
pcall(k)
end
end
x.OnChanged = function(j, j)
x.Changed = j
end
x.SetValue = function(j, j)
if x.Disabled then return
end
x.Value = j
x:Display()
for j, j in pairs(x.Addons) do
if j.Type == "KeyPicker" and j.SyncToggleState then
j.Toggled = x.Value
j:Update()
end
end
f:UpdateDependencyBoxes()
f:SafeCallback(x.Callback, x.Value)
f:SafeCallback(x.Changed, x.Value)
end
x.SetDisabled = function(j, j)
x.Disabled = j
if x.TooltipTable then
x.TooltipTable.Disabled = x.Disabled
end
for j, j in pairs(x.Addons) do
if j.Type == "KeyPicker" and j.SyncToggleState then
j:Update()
end
end
Z.Active = not x.Disabled
x:Display()
end
x.SetVisible = function(j, j)
x.Visible = j
Z.Visible = x.Visible
_:Resize()
end
x.SetText = function(j, j)
x.Text = j
K.Text = j
end
Z.MouseButton1Click:Connect(function()
if x.Disabled then return
end
local j = not x.Value
f:PlaySound(j and "toggle_on" or "toggle_off", 0.12, j and 1.1 or 0.9)
x:SetValue(j)
end)
if typeof(x.Tooltip) == "string" or typeof(x.DisabledTooltip) == "string" then
x.TooltipTable = f:AddTooltip(x.Tooltip, x.DisabledTooltip, Z)
x.TooltipTable.Disabled = x.Disabled
end
if x.Risky then
K.TextColor3 = f.Scheme.RedColor
f.Registry[K].TextColor3 = "RedColor"
end
x:Display()
_:Resize()
x.TextLabel = K
x.Container = J
setmetatable(x, I)
x.Holder = Z
table.insert(_.Elements, x)
x.Default = x.Value
H[o] = x
return x
end
Y.AddToggle = function(J, o, Z)
Z = f:Validate(Z, l.Toggle)
local _ = J
local J, x = _.Container, {Text = Z.Text, Value = Z.Default, Tooltip = Z.Tooltip, DisabledTooltip = Z.DisabledTooltip, TooltipTable = nil, Callback = Z.Callback, Changed = Z.Changed, Risky = Z.Risky, Disabled = Z.Disabled, Visible = Z.Visible, Addons = {}, Type = "Toggle"}
local Z = F("TextButton", {Active = not x.Disabled, BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 18), Text = "", Visible = x.Visible, Parent = J})
local K = F("TextLabel", {BackgroundTransparency = 1, Position = UDim2.fromOffset(26, 0), Size = UDim2.new(1, -26, 1, 0), Text = x.Text, TextSize = 14, TextTransparency = 0.4, TextXAlignment = Enum.TextXAlignment.Left, Parent = Z})
F("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, Padding = UDim.new(0, 6), Parent = K})
local j = F("Frame", {BackgroundColor3 = "MainColor", Size = UDim2.fromScale(1, 1), SizeConstraint = Enum.SizeConstraint.RelativeYY, Parent = Z})
F("UICorner", {CornerRadius = UDim.new(0, f.CornerRadius / 2), Parent = j})
local O, m = F("UIStroke", {Color = "OutlineColor", Parent = j}), F("ImageLabel", {Image = L and L.Url or "", ImageColor3 = "FontColor", ImageRectOffset = L and L.ImageRectOffset or Vector2.zero, ImageRectSize = L and L.ImageRectSize or Vector2.zero, ImageTransparency = 1, Position = UDim2.fromOffset(2, 2), Size = UDim2.new(1, -4, 1, -4), Parent = j})
x.UpdateColors = function(L)
x:Display()
end
x.Display = function(L)
if f.Unloaded then return
end
local function L()
O.Transparency = x.Disabled and 0.5 or 0
if x.Disabled then
K.TextTransparency = 0.8
m.ImageTransparency = x.Value and 0.8 or 1
j.BackgroundColor3 = f.Scheme.BackgroundColor
f.Registry[j].BackgroundColor3 = "BackgroundColor"
return
end
B:Create(K, f.TweenInfo, {TextTransparency = x.Value and 0 or 0.4}):Play()
B:Create(m, f.TweenInfo, {ImageTransparency = x.Value and 0 or 1}):Play()
j.BackgroundColor3 = f.Scheme.MainColor
f.Registry[j].BackgroundColor3 = "MainColor"
end
if yabujinCoreState and yabujinCoreState._withId then
yabujinCoreState._withId(L)
else
pcall(L)
end
end
x.OnChanged = function(L, L)
x.Changed = L
end
x.SetValue = function(L, L)
if x.Disabled then return
end
x.Value = L
x:Display()
for L, L in pairs(x.Addons) do
if L.Type == "KeyPicker" and L.SyncToggleState then
L.Toggled = x.Value
L:Update()
end
end
f:UpdateDependencyBoxes()
f:SafeCallback(x.Callback, x.Value)
f:SafeCallback(x.Changed, x.Value)
end
x.SetDisabled = function(L, L)
x.Disabled = L
if x.TooltipTable then
x.TooltipTable.Disabled = x.Disabled
end
for L, L in pairs(x.Addons) do
if L.Type == "KeyPicker" and L.SyncToggleState then
L:Update()
end
end
Z.Active = not x.Disabled
x:Display()
end
x.SetVisible = function(L, L)
x.Visible = L
Z.Visible = x.Visible
_:Resize()
end
x.SetText = function(L, L)
x.Text = L
K.Text = L
end
Z.MouseButton1Click:Connect(function()
if x.Disabled then return
end
local L = not x.Value
f:PlaySound(L and "toggle_on" or "toggle_off", 0.12, L and 1.1 or 0.9)
x:SetValue(L)
end)
if typeof(x.Tooltip) == "string" or typeof(x.DisabledTooltip) == "string" then
x.TooltipTable = f:AddTooltip(x.Tooltip, x.DisabledTooltip, Z)
x.TooltipTable.Disabled = x.Disabled
end
if x.Risky then
K.TextColor3 = f.Scheme.RedColor
f.Registry[K].TextColor3 = "RedColor"
end
x:Display()
_:Resize()
x.TextLabel = K
x.Container = J
setmetatable(x, I)
x.Holder = Z
table.insert(_.Elements, x)
x.Default = x.Value
H[o] = x
return x
end
Y.AddInput = function(J, L, o)
o = f:Validate(o, l.Input)
local H = J
local J, Z = H.Container, {Text = o.Text, Value = o.Default, Finished = o.Finished, Numeric = o.Numeric, ClearTextOnFocus = o.ClearTextOnFocus, Placeholder = o.Placeholder, AllowEmpty = o.AllowEmpty, EmptyReset = o.EmptyReset, Tooltip = o.Tooltip, DisabledTooltip = o.DisabledTooltip, TooltipTable = nil, Callback = o.Callback, Changed = o.Changed, Disabled = o.Disabled, Visible = o.Visible, Type = "Input"}
local _ = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 39), Visible = Z.Visible, Parent = J})
local J, I = F("TextLabel", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 14), Text = Z.Text, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left, Parent = _}), F("TextBox", {AnchorPoint = Vector2.new(0, 1), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, ClearTextOnFocus = not Z.Disabled and Z.ClearTextOnFocus, PlaceholderText = Z.Placeholder, Position = UDim2.fromScale(0, 1), Size = UDim2.new(1, 0, 0, 21), Text = Z.Value, TextEditable = not Z.Disabled, TextScaled = true, TextXAlignment = Enum.TextXAlignment.Left, Parent = _})
F("UIPadding", {PaddingBottom = UDim.new(0, 3), PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), PaddingTop = UDim.new(0, 4), Parent = I})
Z.UpdateColors = function(x)
if f.Unloaded then return
end
J.TextTransparency = Z.Disabled and 0.8 or 0
I.TextTransparency = Z.Disabled and 0.8 or 0
end
Z.OnChanged = function(x, x)
Z.Changed = x
end
Z.SetValue = function(x, x)
if x == nil then x = Z.EmptyReset or(Z.Numeric and "0" or "")
end
if not Z.AllowEmpty and c(x) == "" then
x = Z.EmptyReset or(Z.Numeric and "0" or "")
end
if o.MaxLength and#x > o.MaxLength then
x = x:sub(1, o.MaxLength)
end
if Z.Numeric then
if#tostring(x) > 0 and not tonumber(x) then
x = Z.Value or "0"
end
end
Z.Value = x
local function o()
I.Text = tostring(x)
end
if yabujinCoreState and yabujinCoreState._withId then
yabujinCoreState._withId(o)
else
pcall(o)
end
if not Z.Disabled then
f:SafeCallback(Z.Callback, Z.Value)
f:SafeCallback(Z.Changed, Z.Value)
end
end
Z.SetDisabled = function(o, o)
Z.Disabled = o
if Z.TooltipTable then
Z.TooltipTable.Disabled = Z.Disabled
end
I.ClearTextOnFocus = not Z.Disabled and Z.ClearTextOnFocus
I.TextEditable = not Z.Disabled
Z:UpdateColors()
end
Z.SetVisible = function(o, o)
Z.Visible = o
_.Visible = Z.Visible
H:Resize()
end
Z.SetText = function(o, o)
Z.Text = o
J.Text = o
end
if Z.Finished then
I.FocusLost:Connect(function(J)
if not J then return
end
Z:SetValue(I.Text)
end)
else
I:GetPropertyChangedSignal("Text"):Connect(function()
Z:SetValue(I.Text)
end)
end
if typeof(Z.Tooltip) == "string" or typeof(Z.DisabledTooltip) == "string" then
Z.TooltipTable = f:AddTooltip(Z.Tooltip, Z.DisabledTooltip, I)
Z.TooltipTable.Disabled = Z.Disabled
end
H:Resize()
Z.Holder = _
table.insert(H.Elements, Z)
Z.Default = Z.Value
z[L] = Z
return Z
end
Y.AddSlider = function(J, L, o)
o = f:Validate(o, l.Slider)
local H = J
local J, Z = H.Container, {Text = o.Text, Value = o.Default, Min = o.Min, Max = o.Max, Prefix = o.Prefix, Suffix = o.Suffix, Compact = o.Compact, Rounding = o.Rounding, Tooltip = o.Tooltip, DisabledTooltip = o.DisabledTooltip, TooltipTable = nil, Callback = o.Callback, Changed = o.Changed, Disabled = o.Disabled, Visible = o.Visible, Type = "Slider"}
local _ = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, o.Compact and 13 or 31), Visible = Z.Visible, Parent = J})
local J
if not o.Compact then
J = F("TextLabel", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 14), Text = Z.Text, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left, Parent = _})
end
local c = F("TextButton", {Active = not Z.Disabled, AnchorPoint = Vector2.new(0, 1), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Position = UDim2.fromScale(0, 1), Size = UDim2.new(1, 0, 0, 8), Text = "", Parent = _})
F("UICorner", {CornerRadius = UDim.new(0, 4), Parent = c})
local I = F("TextLabel", {BackgroundTransparency = 1, Size = UDim2.fromScale(1, 1), Text = "", TextSize = 14, ZIndex = 2, Parent = c})
F("UIStroke", {ApplyStrokeMode = Enum.ApplyStrokeMode.Contextual, Color = "DarkColor", LineJoinMode = Enum.LineJoinMode.Miter, Parent = I})
local x = F("Frame", {BackgroundColor3 = "AccentColor", Size = UDim2.fromScale(0.5, 1), Parent = c})
F("UICorner", {CornerRadius = UDim.new(0, 4), Parent = x})
Z.UpdateColors = function(K)
if f.Unloaded then return
end
if J then
J.TextTransparency = Z.Disabled and 0.8 or 0
end
I.TextTransparency = Z.Disabled and 0.8 or 0
x.BackgroundColor3 = Z.Disabled and f.Scheme.OutlineColor or f.Scheme.AccentColor
f.Registry[x].BackgroundColor3 = Z.Disabled and "OutlineColor" or "AccentColor"
end
Z.Display = function(K)
if f.Unloaded then return
end
K = if o.FormatDisplayValue then(o.FormatDisplayValue(Z, Z.Value)) else nil
if K then
I.Text = tostring(K)
elseif o.Compact then
I.Text = string.format("%s: %s%s%s", Z.Text, Z.Prefix, Z.Value, Z.Suffix)
elseif o.HideMax then
I.Text = string.format("%s%s%s", Z.Prefix, Z.Value, Z.Suffix)
else
I.Text = string.format("%s%s%s/%s%s%s", Z.Prefix, Z.Value, Z.Suffix, Z.Prefix, Z.Max, Z.Suffix)
end
K = (Z.Value -Z.Min) / (Z.Max -Z.Min)
x.Size = UDim2.fromScale(K, 1)
end
Z.OnChanged = function(o, o)
Z.Changed = o
end
Z.SetMax = function(o, o)
assert(o > Z.Min, "Max value cannot be less than the current min value.")
Z:SetValue(math.clamp(Z.Value, Z.Min, o))
Z.Max = o
Z:Display()
end
Z.SetMin = function(o, o)
assert(o < Z.Max, "Min value cannot be greater than the current max value.")
Z:SetValue(math.clamp(Z.Value, o, Z.Max))
Z.Min = o
Z:Display()
end
Z.SetValue = function(o, I)
if Z.Disabled then return
end
o = tonumber(I)
if not o or o == Z.Value then
return
end
Z.Value = math.clamp(o, Z.Min, Z.Max)
Z:Display()
f:SafeCallback(Z.Callback, Z.Value)
f:SafeCallback(Z.Changed, Z.Value)
end
Z.SetDisabled = function(o, o)
Z.Disabled = o
if Z.TooltipTable then
Z.TooltipTable.Disabled = Z.Disabled
end
c.Active = not Z.Disabled
Z:UpdateColors()
end
Z.SetVisible = function(o, o)
Z.Visible = o
_.Visible = Z.Visible
H:Resize()
end
Z.SetText = function(o, o)
Z.Text = o
if J then
J.Text = o
return
end
Z:Display()
end
Z.SetPrefix = function(J, J)
Z.Prefix = J
Z:Display()
end
Z.SetSuffix = function(J, J)
Z.Suffix = J
Z:Display()
end
c.InputBegan:Connect(function(J)
if not a(J) or Z.Disabled then return
end
for o, o in pairs(f.ActiveTab.Sides) do
o.ScrollingEnabled = false
end
while g(J) do
local J = C.X
local o, g = math.clamp((J -c.AbsolutePosition.X) / c.AbsoluteSize.X, 0, 1), Z.Value
Z.Value = e(Z.Min + (Z.Max -Z.Min) * o, Z.Rounding)
Z:Display()
if Z.Value ~= g then
f:SafeCallback(Z.Callback, Z.Value)
f:SafeCallback(Z.Changed, Z.Value)
end
q.RenderStepped:Wait()
end
for J, J in pairs(f.ActiveTab.Sides) do
J.ScrollingEnabled = true
end
end)
if typeof(Z.Tooltip) == "string" or typeof(Z.DisabledTooltip) == "string" then
Z.TooltipTable = f:AddTooltip(Z.Tooltip, Z.DisabledTooltip, c)
Z.TooltipTable.Disabled = Z.Disabled
end
Z:UpdateColors()
Z:Display()
H:Resize()
Z.Holder = _
table.insert(H.Elements, Z)
Z.Default = Z.Value
z[L] = Z
return Z
end
Y.AddDropdown = function(J, L, o)
o = f:Validate(o, l.Dropdown)
local H = J
J = H.Container
if o.SpecialType == "Player" then
o.Values = r(o.ExcludeLocalPlayer)
o.AllowNull = true
elseif o.SpecialType == "Team" then
o.Values = u()
o.AllowNull = true
end
local Z = {Text = typeof(o.Text) == "string" and o.Text or nil, Value = o.Multi and{} or nil, Values = o.Values, DisabledValues = o.DisabledValues, Multi = o.Multi, SpecialType = o.SpecialType, ExcludeLocalPlayer = o.ExcludeLocalPlayer, Tooltip = o.Tooltip, DisabledTooltip = o.DisabledTooltip, TooltipTable = nil, Callback = o.Callback, Changed = o.Changed, Disabled = o.Disabled, Visible = o.Visible, Type = "Dropdown"}
local g = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, Z.Text and 39 or 21), Visible = Z.Visible, Parent = J})
local _, c = F("TextLabel", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, 14), Text = Z.Text, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left, Visible = not not o.Text, Parent = g}), F("TextButton", {Active = not Z.Disabled, AnchorPoint = Vector2.new(0, 1), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Position = UDim2.fromScale(0, 1), Size = UDim2.new(1, 0, 0, 21), Text = "---", TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left, Parent = g})
F("UIPadding", {PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 4), Parent = c})
local e = F("ImageLabel", {AnchorPoint = Vector2.new(1, 0.5), Image = P and P.Url or "", ImageColor3 = "FontColor", ImageRectOffset = P and P.ImageRectOffset or Vector2.zero, ImageRectSize = P and P.ImageRectSize or Vector2.zero, ImageTransparency = 0.5, Position = UDim2.fromScale(1, 0.5), Size = UDim2.fromOffset(16, 16), Parent = c})
local P
if o.Searchable then
P = F("TextBox", {BackgroundTransparency = 1, PlaceholderText = "Search...", Position = UDim2.fromOffset(- 8, 0), Size = UDim2.new(1, -12, 1, 0), TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left, Visible = false, Parent = c})
F("UIPadding", {PaddingLeft = UDim.new(0, 8), Parent = P})
end
local I = f:AddContextMenu(c, function()
return UDim2.fromOffset(c.AbsoluteSize.X / f.DPIScale, 0)
end, function()
return{0.5, c.AbsoluteSize.Y + 1.5}
end, 2, function(x)
c.TextTransparency = x and P and 1 or 0
e.ImageTransparency = x and 0 or 0.5
e.Rotation = x and 180 or 0
if P then
P.Text = ""
P.Visible = x
end
end)
Z.Menu = I
Z.RecalculateListSize = function(x, x)
local K = math.clamp((x or(p(Z.Values))) * 21, 0, o.MaxVisibleDropdownItems * 21)
I:SetSize(function()
return UDim2.fromOffset(c.AbsoluteSize.X / f.DPIScale, K)
end)
end
Z.UpdateColors = function(p)
if f.Unloaded then return
end
_.TextTransparency = Z.Disabled and 0.8 or 0
c.TextTransparency = Z.Disabled and 0.8 or 0
e.ImageTransparency = Z.Disabled and 0.8 or I.Active and 0 or 0.5
end
Z.Display = function(p)
if f.Unloaded then return
end
p = ""
if o.Multi then
for e, e in pairs(Z.Values) do
p = if Z.Value[e] then p .. (o.FormatDisplayValue and(tostring(o.FormatDisplayValue(e))) or(tostring(e))) .. ", " else p
end
p = (p:sub(1, #p -2))
else
p = Z.Value and(tostring(Z.Value)) or ""
p = if p ~= "" and o.FormatDisplayValue then(tostring(o.FormatDisplayValue(p))) else p
end
c.Text = (if#p > 25 then p:sub(1, 22) .. "..." else p) == "" and "---" or(if#p > 25 then p:sub(1, 22) .. "..." else p)
end
Z.OnChanged = function(p, p)
Z.Changed = p
end
Z.GetActiveValues = function(p)
if o.Multi then p = {}
for e, x in pairs(Z.Value) do
table.insert(p, e)
end
return p
end
return Z.Value and 1 or 0
end
local p = {}
Z.BuildDropdownList = function(e)
local x, K = Z.Values, Z.DisabledValues
for j, O in pairs(p) do
j:Destroy()
end
table.clear(p)
e = 0
for j, j in pairs(x) do
if not P or(tostring(j):lower():match(P.Text:lower())) then
e += 1
local x, O = table.find(K, j), {}
local K = F("TextButton", {BackgroundColor3 = "MainColor", BackgroundTransparency = 1, LayoutOrder = x and 1 or 0, Size = UDim2.new(1, 0, 0, 21), Text = tostring(j), TextSize = 14, TextTransparency = 0.5, TextXAlignment = Enum.TextXAlignment.Left, Parent = I.Menu})
F("UIPadding", {PaddingLeft = UDim.new(0, 7), PaddingRight = UDim.new(0, 7), Parent = K})
local m
if o.Multi then
m = Z.Value[j]
else
m = Z.Value == j
end
O.UpdateButton = function(k)
m = if o.Multi then Z.Value[j] else Z.Value == j
K.BackgroundTransparency = m and 0 or 1
K.TextTransparency = x and 0.8 or m and 0 or 0.5
end
if not x then
K.MouseButton1Click:Connect(function()
local x = not m
if not(Z:GetActiveValues() == 1 and not x and not o.AllowNull) then
m = x
if o.Multi then
Z.Value[j] = m and true or nil
else
Z.Value = m and j or nil
end
for x, x in pairs(p) do
x:UpdateButton()
end
end
O:UpdateButton()
Z:Display()
f:UpdateDependencyBoxes()
f:SafeCallback(Z.Callback, Z.Value)
f:SafeCallback(Z.Changed, Z.Value)
end)
end
O:UpdateButton()
Z:Display()
p[K] = O
end
end
Z:RecalculateListSize(e)
end
Z.SetValue = function(e, x)
if o.Multi then e = {}
for K, j in x or{}, nil, nil do
if typeof(j) ~= "boolean" then
e[j] = true
elseif j and(table.find(Z.Values, K)) then
e[K] = true
end
end
Z.Value = e
elseif table.find(Z.Values, x) then
Z.Value = x
elseif not x then
Z.Value = nil
end
Z:Display()
for e, e in pairs(p) do
e:UpdateButton()
end
if not Z.Disabled then
f:UpdateDependencyBoxes()
f:SafeCallback(Z.Callback, Z.Value)
f:SafeCallback(Z.Changed, Z.Value)
end
end
Z.SetValues = function(p, p)
Z.Values = p
Z:BuildDropdownList()
end
Z.SetMulti = function(p, e)
e = not not e
if o.Multi == e then
return
end
o.Multi = e
Z.Multi = e
if e then
local e, x = Z.Value, {}
if typeof(e) == "string" then
x[e] = true
end
Z.Value = x
else
p = nil
if typeof(Z.Value) == "table" then
for e, e in ipairs(Z.Values) do
if Z.Value[e] then
p = e
break
end
end
end
Z.Value = p
end
Z:BuildDropdownList()
Z:Display()
end
Z.AddValues = function(p, p)
if typeof(p) == "table" then for e, e in pairs(p) do
table.insert(Z.Values, e)
end
elseif typeof(p) == "string" then
table.insert(Z.Values, p)
else
return
end
Z:BuildDropdownList()
end
Z.SetDisabledValues = function(p, p)
Z.DisabledValues = p
Z:BuildDropdownList()
end
Z.AddDisabledValues = function(p, p)
if typeof(p) == "table" then for e, e in pairs(p) do
table.insert(Z.DisabledValues, e)
end
elseif typeof(p) == "string" then
table.insert(Z.DisabledValues, p)
else
return
end
Z:BuildDropdownList()
end
Z.SetDisabled = function(p, p)
Z.Disabled = p
if Z.TooltipTable then
Z.TooltipTable.Disabled = Z.Disabled
end
I:Close()
c.Active = not Z.Disabled
Z:UpdateColors()
end
Z.SetVisible = function(p, p)
Z.Visible = p
g.Visible = Z.Visible
H:Resize()
end
Z.SetText = function(p, p)
Z.Text = p
g.Size = UDim2.new(1, 0, 0, p and 39 or 21)
_.Text = p or ""
_.Visible = not not p
end
c.MouseButton1Click:Connect(function()
if Z.Disabled then return
end
I:Toggle()
end)
if P then
P:GetPropertyChangedSignal("Text"):Connect(Z.BuildDropdownList)
end
J = {}
if typeof(o.Default) == "string" then
local P = table.find(Z.Values, o.Default)
if P then
table.insert(J, P)
end
elseif typeof(o.Default) == "table" then
for P, p in next, o.Default, nil do
P = table.find(Z.Values, p)
if P then
table.insert(J, P)
end
end
elseif Z.Values[o.Default] ~= nil then
table.insert(J, o.Default)
end
if next(J) then
for P = 1, #J, 1 do
local p = J[P]
if o.Multi then
Z.Value[Z.Values[p]] = true
else
Z.Value = Z.Values[p]
end
if not o.Multi then
break
end
end
end
if typeof(Z.Tooltip) == "string" or typeof(Z.DisabledTooltip) == "string" then
Z.TooltipTable = f:AddTooltip(Z.Tooltip, Z.DisabledTooltip, c)
Z.TooltipTable.Disabled = Z.Disabled
end
Z:UpdateColors()
Z:Display()
Z:BuildDropdownList()
H:Resize()
Z.Holder = g
table.insert(H.Elements, Z)
Z.Default = J
Z.DefaultValues = Z.Values
z[L] = Z
return Z
end
Y.AddViewport = function(J, L, o)
o = f:Validate(o, l.Viewport)
local H = J
local P, Z, p, g = H.Container, false, false
local _, c = 0, o.Object
if o.Clone and typeof(o.Object) == "Instance" then
J = o.Object
if J.Archivable then
c = (c:Clone())
else
o.Object.Archivable = true
c = c:Clone()
o.Object.Archivable = false
end
end
local e = {Object = c, Camera = not o.Camera and(Instance.new("Camera")) or o.Camera, Interactive = o.Interactive, Zoom = o.Zoom, AutoFocus = o.AutoFocus, Visible = o.Visible, Type = "Viewport"}
assert(typeof(e.Object) == "Instance" and(e.Object:IsA("BasePart") or(e.Object:IsA("Model"))), "Instance must be a BasePart or Model.")
assert(typeof(e.Camera) == "Instance" and(e.Camera:IsA("Camera")), "Camera must be a valid Camera instance.")
local function c(I)
if I:IsA("BasePart") then return I.Size
end
return select(2, I:GetBoundingBox())
end
local function I()
local x = c(e.Object)
local c = math.max(x.X, x.Y, x.Z)
local x, K = c * 2, e.Object:GetPivot().Position
e.Camera.CFrame = CFrame.new(K + Vector3.new(0, c / 2, x), K)
end
local c = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, o.Height), Visible = e.Visible, Parent = P})
J = F("Frame", {AnchorPoint = Vector2.new(0, 1), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Position = UDim2.fromScale(0, 1), Size = UDim2.fromScale(1, 1), Parent = c})
F("UIPadding", {PaddingBottom = UDim.new(0, 3), PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), PaddingTop = UDim.new(0, 4), Parent = J})
local o = F("ViewportFrame", {BackgroundTransparency = 1, Size = UDim2.fromScale(1, 1), Parent = J, CurrentCamera = e.Camera, Active = e.Interactive})
o.MouseEnter:Connect(function()
if not e.Interactive then return
end
for J, J in pairs(H.Tab.Sides) do
J.ScrollingEnabled = false
end
end)
o.MouseLeave:Connect(function()
if not e.Interactive then return
end
for J, J in pairs(H.Tab.Sides) do
J.ScrollingEnabled = true
end
end)
o.InputBegan:Connect(function(J)
if not e.Interactive then return
end
if J.UserInputType == Enum.UserInputType.MouseButton1 or J.UserInputType == Enum.UserInputType.MouseButton2 then
Z = true
g = J.Position
elseif J.UserInputType == Enum.UserInputType.Touch and not p then
Z = true
g = J.Position
end
end)
f:GiveSignal(U.InputEnded:Connect(function(J)
if f.Unloaded then return
end
if not e.Interactive then
return
end
local P = J.UserInputType == Enum.UserInputType.MouseButton1 or J.UserInputType == Enum.UserInputType.MouseButton2
if P then
Z = false
else
local P, x = J.UserInputType, Enum.UserInputType.Touch
if P == x then
Z = false
end
end
end))
f:GiveSignal(U.InputChanged:Connect(function(J)
if f.Unloaded then return
end
if not e.Interactive or not Z or p then
return
end
if J.UserInputType == Enum.UserInputType.MouseMovement or J.UserInputType == Enum.UserInputType.Touch then
local P = J.Position -g
g = J.Position
local J, g, x = e.Object:GetPivot().Position, e.Camera, CFrame.fromAxisAngle(Vector3.new(0, 1, 0), -P.X * 0.01)
g.CFrame = CFrame.new(J) * x * CFrame.new(- J) * g.CFrame
x = CFrame.fromAxisAngle(g.CFrame.RightVector, -P.Y * 0.01)
P = CFrame.new(J) * x * CFrame.new(- J) * g.CFrame
if P.UpVector.Y > 0.1 then
g.CFrame = P
end
end
end))
o.InputChanged:Connect(function(J)
if not e.Interactive or not e.Zoom then return
end
if J.UserInputType == Enum.UserInputType.MouseWheel then
local P = J.Position.Z * 2
local J, g, x = e.Camera.CFrame + e.Camera.CFrame.LookVector * P, pcall(function()
return e.Object:GetPivot().Position
end)
if g and x then
P = (J.Position -x).Magnitude
if P > 1 and P < 50 then
e.Camera.CFrame = J
end
else
e.Camera.CFrame = J
end
end
end)
f:GiveSignal(U.TouchPinch:Connect(function(J, P, g, x)
if f.Unloaded then return
end
if not e.Interactive or not e.Zoom or not f:MouseIsOverFrame(o, J[1]) then
return
end
if x == Enum.UserInputState.Begin then
p, Z = true, false
_ = (J[1] -J[2]).Magnitude
elseif x == Enum.UserInputState.Change then
P = (J[1] -J[2]).Magnitude
g = (P -_) * 0.1
_ = P
e.Camera.CFrame = e.Camera.CFrame + e.Camera.CFrame.LookVector * g
else
local J = x == Enum.UserInputState.End or x == Enum.UserInputState.Cancel
if J then
p = false
end
end
end))
e.Object.Parent = o
if e.AutoFocus then
I()
end
e.SetObject = function(J, J, P)
assert(J, "Object cannot be nil.")
J = if P then(J:Clone()) else J
if e.Object then
e.Object:Destroy()
end
e.Object = J
e.Object.Parent = o
H:Resize()
end
e.SetHeight = function(J, J)
assert(J > 0, "Height must be greater than 0.")
c.Size = UDim2.new(1, 0, 0, J)
H:Resize()
end
e.Focus = function(J)
if not e.Object then return
end
I()
end
e.SetCamera = function(J, J)
assert(J and typeof(J) == "Instance" and(J:IsA("Camera")), "Camera must be a valid Camera instance.")
e.Camera = J
o.CurrentCamera = J
end
e.SetInteractive = function(J, J)
e.Interactive = J
o.Active = J
end
e.SetVisible = function(J, J)
e.Visible = J
c.Visible = e.Visible
H:Resize()
end
H:Resize()
e.Holder = c
table.insert(H.Elements, e)
z[L] = e
return e
end
Y.AddImage = function(J, L, o)
o = f:Validate(o, l.Image)
local H = J
local P, Z = H.Container, {Image = o.Image, Color = o.Color, RectOffset = o.RectOffset, RectSize = o.RectSize, Height = o.Height, ScaleType = o.ScaleType, Transparency = o.Transparency, BackgroundTransparency = o.BackgroundTransparency, Visible = o.Visible, Type = "Image"}
local p = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, o.Height), Visible = Z.Visible, Parent = P})
P = F("Frame", {AnchorPoint = Vector2.new(0, 1), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, BackgroundTransparency = Z.BackgroundTransparency, Position = UDim2.fromScale(0, 1), Size = UDim2.fromScale(1, 1), Parent = p})
F("UIPadding", {PaddingBottom = UDim.new(0, 3), PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), PaddingTop = UDim.new(0, 4), Parent = P})
J = {BackgroundTransparency = 1, Size = UDim2.fromScale(1, 1), Image = Z.Image, ImageTransparency = Z.Transparency, ImageColor3 = Z.Color, ImageRectOffset = Z.RectOffset, ImageRectSize = Z.RectSize, ScaleType = Z.ScaleType, Parent = P}
o = f:GetCustomIcon(J.Image)
assert(o, "Image must be a valid Roblox asset or a valid URL or a valid lucide icon.")
J.Image = o.Url
J.ImageRectOffset = o.ImageRectOffset
J.ImageRectSize = o.ImageRectSize
local o = F("ImageLabel", J)
Z.SetHeight = function(J, J)
assert(J > 0, "Height must be greater than 0.")
Z.Height = J
p.Size = UDim2.new(1, 0, 0, J)
H:Resize()
end
Z.SetImage = function(J, P)
assert(typeof(P) == "string", "Image must be a string.")
J = f:GetCustomIcon(P)
assert(J, "Image must be a valid Roblox asset or a valid URL or a valid lucide icon.")
P = J.Url
Z.RectOffset = J.ImageRectOffset
Z.RectSize = J.ImageRectSize
o.Image = P
Z.Image = P
end
Z.SetColor = function(J, J)
assert(typeof(J) == "Color3", "Color must be a Color3 value.")
o.ImageColor3 = J
Z.Color = J
end
Z.SetRectOffset = function(J, J)
assert(typeof(J) == "Vector2", "RectOffset must be a Vector2 value.")
o.ImageRectOffset = J
Z.RectOffset = J
end
Z.SetRectSize = function(J, J)
assert(typeof(J) == "Vector2", "RectSize must be a Vector2 value.")
o.ImageRectSize = J
Z.RectSize = J
end
Z.SetScaleType = function(J, J)
assert(typeof(J) == "EnumItem" and(J:IsA("ScaleType")), "ScaleType must be a valid Enum.ScaleType.")
o.ScaleType = J
Z.ScaleType = J
end
Z.SetTransparency = function(J, J)
assert(typeof(J) == "number", "Transparency must be a number between 0 and 1.")
assert(J >= 0 and J <= 1, "Transparency must be between 0 and 1.")
o.ImageTransparency = J
Z.Transparency = J
end
Z.SetVisible = function(J, J)
Z.Visible = J
p.Visible = Z.Visible
H:Resize()
end
H:Resize()
Z.Holder = p
table.insert(H.Elements, Z)
z[L] = Z
return Z
end
Y.AddVideo = function(J, L, o)
o = f:Validate(o, l.Video)
local H = J
local J, P = H.Container, {Video = o.Video, Looped = o.Looped, Playing = o.Playing, Volume = o.Volume, Height = o.Height, Visible = o.Visible, Type = "Video"}
local Z = F("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, 0, 0, o.Height), Visible = P.Visible, Parent = J})
J = F("Frame", {AnchorPoint = Vector2.new(0, 1), BackgroundColor3 = "MainColor", BorderColor3 = "OutlineColor", BorderSizePixel = 1, Position = UDim2.fromScale(0, 1), Size = UDim2.fObfuscated. The code is scrambled, so you can't read what it does. Common for key systems, but take care.
Loads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: raw.githubusercontent.com.

Universal