File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ -- Main.lua - NgNhDuc Hub loader
2+ -- Place at: https://raw.githubusercontent.com/<GITHUB_USERNAME>/NgNhDuc/refs/heads/main/Main.lua
3+
4+ local _ENV = (getgenv and getgenv ()) or getrenv () or getfenv ()
5+ local CURRENT_VERSION = _ENV .Version or " V1"
6+
7+ local Versions = {
8+ V1 = " https://raw.githubusercontent.com/NgNhDuc/NgNhDuc/refs/heads/main/Version/V1.lua"
9+ }
10+
11+ local url = Versions [CURRENT_VERSION ]
12+ if not url then
13+ warn (" [NgNhDuc Hub] Invalid version: " .. tostring (CURRENT_VERSION ))
14+ return
15+ end
16+
17+ print (" [NgNhDuc Hub] Loading version:" , CURRENT_VERSION )
18+
19+ local ok , src = pcall (function () return game :HttpGet (url ) end )
20+ if not ok then
21+ warn (" [NgNhDuc Hub] Failed to download version script:" , src )
22+ return
23+ end
24+
25+ local success , err = pcall (loadstring (src ))
26+ if not success then
27+ warn (" [NgNhDuc Hub] Error running version script:" , err )
28+ else
29+ print (" [NgNhDuc Hub] Version loaded successfully!" )
30+ end
You can’t perform that action at this time.
0 commit comments