Advertisement
Thecodeeasar

Untitled

Oct 15th, 2024
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.86 KB | None | 0 0
  1. local ArrayField = loadstring(game:HttpGet('https://raw.githubusercontent.com/UI-Interface/ArrayField/main/Source.lua'))()
  2.  
  3. -- Key System
  4. local keyCheck = ArrayField:CreateWindow({
  5. Name = "ynaneyt hub",
  6. LoadingTitle = "ynaneyt hub",
  7. LoadingSubtitle = "by wutdahell510",
  8. KeySystem = true,
  9. KeySettings = {
  10. Title = "ynaneyt hub Key System",
  11. Subtitle = "Enter the key to access the hub",
  12. Note = "Get the key from the Pastebin URL",
  13. FileName = "ynaneytKey",
  14. SaveKey = true,
  15. GrabKeyFromSite = false,
  16. Key = "veryprogamerscript",
  17. Actions = {
  18. [1] = {
  19. Text = "Copy Pastebin URL",
  20. Callback = function()
  21. print("Copy button clicked") -- Debug log
  22. local success, result = pcall(function()
  23. setclipboard("https://pastebin.com/raw/kPczkY5s")
  24. end)
  25. if success then
  26. print("setclipboard function called successfully") -- Debug log
  27. ArrayField:Notify({
  28. Title = "URL Copied",
  29. Content = "The Pastebin URL has been copied to your clipboard",
  30. Duration = 3
  31. })
  32. else
  33. print("Error in setclipboard:", result) -- Debug log
  34. ArrayField:Notify({
  35. Title = "Copy Failed",
  36. Content = "Unable to copy automatically. Please manually copy: https://pastebin.com/raw/kPczkY5s",
  37. Duration = 10
  38. })
  39. end
  40. end
  41. },
  42. [2] = {
  43. Text = "Show Pastebin URL",
  44. Callback = function()
  45. ArrayField:Notify({
  46. Title = "Pastebin URL",
  47. Content = "https://pastebin.com/raw/kPczkY5s",
  48. Duration = 30
  49. })
  50. end
  51. }
  52. }
  53. }
  54. })
  55.  
  56. -- Function to load all sections
  57. local function loadSections()
  58. -- Initialize _G table for data saving if it doesn't exist
  59. if not _G.ynaneytData then
  60. _G.ynaneytData = {
  61. users = {},
  62. rank = "no rank",
  63. lastUpdate = 0
  64. }
  65. end
  66.  
  67. -- Function to check if user has a specific rank
  68. local function hasRank(rank)
  69. return _G.ynaneytData.rank == rank
  70. end
  71.  
  72. -- Function to check if user has premium access
  73. local function hasPremium()
  74. return hasRank("premium") or hasRank("content creator") or hasRank("owner")
  75. end
  76.  
  77. -- Function to set user rank
  78. local function setRank(userId, rank)
  79. if not _G.ynaneytData.users[userId] then
  80. _G.ynaneytData.users[userId] = {}
  81. end
  82. _G.ynaneytData.users[userId].rank = rank
  83. _G.ynaneytData.lastUpdate = os.time()
  84. end
  85.  
  86. -- Function to check for rank updates
  87. local function checkRankUpdates()
  88. local player = game.Players.LocalPlayer
  89. local userId = player.UserId
  90.  
  91. if _G.ynaneytData.users[userId] and _G.ynaneytData.users[userId].rank ~= _G.ynaneytData.rank then
  92. local newRank = _G.ynaneytData.users[userId].rank
  93. _G.ynaneytData.rank = newRank
  94. ArrayField:Notify({
  95. Title = "Rank Updated",
  96. Content = "The owner has given you " .. newRank .. " rank!",
  97. Duration = 10
  98. })
  99. updateUI()
  100. end
  101. end
  102.  
  103. -- Function to update UI based on rank
  104. local function updateUI()
  105. -- Implementation depends on how you want to show/hide sections
  106. -- This is a placeholder and needs to be implemented based on your UI structure
  107. print("Updating UI for rank: " .. _G.ynaneytData.rank)
  108. end
  109.  
  110. -- Notification about bug reporting
  111. ArrayField:Notify({
  112. Title = "Bug Reporting",
  113. Content = "If you encounter any bugs, please message wutdahell510onrobloxnewaccount on Discord to report and receive a reward.",
  114. Duration = 10
  115. })
  116.  
  117. local w = ArrayField:CreateWindow({
  118. Name = "ynaneyt hub",
  119. LoadingTitle = "ynaneyt hub",
  120. LoadingSubtitle = "by wutdahell510",
  121. ConfigurationSaving = {
  122. Enabled = true,
  123. FolderName = nil,
  124. FileName = "ynaneytConfig"
  125. }
  126. })
  127.  
  128. -- Main Tab (visible to all)
  129. local MainTab = w:CreateTab("Main Tab")
  130.  
  131. MainTab:CreateButton({
  132. Name = "Show Rank",
  133. Callback = function()
  134. ArrayField:Notify({
  135. Title = "Your Rank",
  136. Content = "Your current rank is: " .. _G.ynaneytData.rank,
  137. Duration = 5
  138. })
  139. end
  140. })
  141.  
  142. MainTab:CreateButton({
  143. Name = "Anti AFK",
  144. Callback = function()
  145. local vu = game:GetService("VirtualUser")
  146. game.Players.LocalPlayer.Idled:connect(function()
  147. vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  148. wait(1)
  149. vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  150. end)
  151. ArrayField:Notify({Title = "Anti AFK", Content = "Anti AFK has been enabled", Duration = 5})
  152. end
  153. })
  154.  
  155. -- Owner Tab (Data Storage, only visible to owner)
  156. if hasRank("owner") then
  157. local OwnerTab = w:CreateTab("Data Storage")
  158.  
  159. OwnerTab:CreateInput({
  160. Name = "Set User Rank",
  161. PlaceholderText = "UserId,Rank",
  162. RemoveTextAfterFocusLost = false,
  163. Callback = function(Text)
  164. local userId, rank = Text:match("(%d+),(%w+)")
  165. if userId and rank then
  166. setRank(tonumber(userId), rank)
  167. ArrayField:Notify({
  168. Title = "Rank Set",
  169. Content = "User " .. userId .. " rank set to " .. rank,
  170. Duration = 5
  171. })
  172. end
  173. end,
  174. })
  175. end
  176.  
  177. -- Content Creator Section (only visible to content creators and owner)
  178. if hasRank("content creator") or hasRank("owner") then
  179. local CCTab = w:CreateTab("Content Creator")
  180.  
  181. CCTab:CreateButton({
  182. Name = "Notify Feature",
  183. Callback = function()
  184. ArrayField:Notify({Title = "Coming Soon", Content = "New features for Content Creators are coming soon!", Duration = 5})
  185. end
  186. })
  187. end
  188.  
  189. -- Premium Section (visible to premium, content creators, and owner)
  190. if hasPremium() then
  191. local PremiumTab = w:CreateTab("Premium")
  192.  
  193. PremiumTab:CreateButton({
  194. Name = "Anti Kick",
  195. Callback = function()
  196. local mt = getrawmetatable(game)
  197. local old = mt.__namecall
  198. setreadonly(mt, false)
  199. mt.__namecall = newcclosure(function(self, ...)
  200. local method = getnamecallmethod()
  201. if method == "Kick" then
  202. return wait(9e9)
  203. end
  204. return old(self, ...)
  205. end)
  206. setreadonly(mt, true)
  207. ArrayField:Notify({Title = "Anti Kick", Content = "Anti Kick has been enabled", Duration = 5})
  208. end
  209. })
  210. end
  211.  
  212. -- Start a loop to check for rank updates
  213. spawn(function()
  214. while wait(5) do -- Check every 5 seconds
  215. checkRankUpdates()
  216. end
  217. end)
  218.  
  219. -- Initial UI update
  220. updateUI()
  221. end
  222.  
  223. -- Load sections after key system is completed
  224. keyCheck.Closed:Connect(function()
  225. loadSections()
  226. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement