Advertisement
jjsnappy

AFK Luck Legends

Feb 2nd, 2022
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.53 KB | None | 0 0
  1. local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/Maxgat5/UiLib/main/lua')))()
  2. local w = library:CreateWindow("AFK Luck Legends")
  3. local b = w:CreateFolder("Gems Upgrades")
  4. local f = w:CreateFolder("Rebirth Upgrades")
  5. local h = w:CreateFolder("Prestige Upgrade")
  6. local e = w:CreateFolder("Mix")
  7. local u = w:CreateFolder("Credits")
  8.  
  9. b:Toggle("Gems",function(bool)
  10. shared.toggle = bool
  11. GemsGU = bool
  12. end)
  13.  
  14. b:Toggle("Luck",function(bool)
  15. shared.toggle = bool
  16. LuckGU = bool
  17. end)
  18.  
  19. b:Toggle("XP",function(bool)
  20. shared.toggle = bool
  21. XPGU = bool
  22. end)
  23.  
  24. f:Toggle("Tokens",function(bool)
  25. shared.toggle = bool
  26. TokensRU = bool
  27. end)
  28.  
  29. f:Toggle("Luck",function(bool)
  30. shared.toggle = bool
  31. LuckRU = bool
  32. end)
  33.  
  34. f:Toggle("XP",function(bool)
  35. shared.toggle = bool
  36. XPRU = bool
  37. end)
  38.  
  39. h:Toggle("Tokens",function(bool)
  40. shared.toggle = bool
  41. TokensPU = bool
  42. end)
  43.  
  44. h:Toggle("Luck",function(bool)
  45. shared.toggle = bool
  46. LuckPU = bool
  47. end)
  48.  
  49. h:Toggle("XP",function(bool)
  50. shared.toggle = bool
  51. XPPU = bool
  52. end)
  53.  
  54. e:Toggle("AntiAfk",function(bool)
  55. shared.toggle = bool
  56. AntiAfk = bool
  57. end)
  58.  
  59. --Credits
  60. u:Label("Youtube Subs: "..getgenv().Subscribers,{
  61. TextSize = 25;
  62. TextColor = Color3.fromRGB(255,255,255);
  63. BgColor = Color3.fromRGB(69,69,69)
  64. })
  65.  
  66. u:Label("Discord Members: "..getgenv().TotalMembers,{
  67. TextSize = 25;
  68. TextColor = Color3.fromRGB(255,255,255);
  69. BgColor = Color3.fromRGB(69,69,69)
  70. })
  71.  
  72. u:Label("Pastebin Views: "..getgenv().TotalPastebinViews,{
  73. TextSize = 25;
  74. TextColor = Color3.fromRGB(255,255,255);
  75. BgColor = Color3.fromRGB(69,69,69)
  76. })
  77.  
  78. u:Button("Discord Server",function()
  79. setclipboard(getgenv().Discord)
  80. end)
  81.  
  82. u:Button("Youtube Channel",function()
  83. setclipboard(getgenv().Youtube)
  84. end)
  85.  
  86. u:Button("Pastebin Page",function()
  87. setclipboard(getgenv().Pastebin)
  88. end)
  89.  
  90. u:Button(getgenv().Username,function()
  91. setclipboard(getgenv().Username)
  92. end)
  93.  
  94. toggle = false
  95. game:GetService("StarterGui"):SetCore("SendNotification", {
  96. Title = "Maxgat5 Scripts";
  97. Text = "Press E To Toggle The Script";
  98. Duration = 45;
  99. })
  100.  
  101. game:GetService("UserInputService").InputBegan:Connect(function(key)
  102. if key.KeyCode == Enum.KeyCode.E then
  103. toggle = not toggle
  104. end
  105. end)
  106.  
  107. for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.MainUI.UpgradeFrame.UpgradeScroll.GemUpgrades.Upgrades:GetChildren()) do
  108. if v.ClassName == "Frame" then
  109. checkGems = string.find(v.TextLabel.Text,"Gems")
  110. checkLuck = string.find(v.TextLabel.Text,"Luck")
  111. checkXP = string.find(v.TextLabel.Text,"XP")
  112. if checkGems ~= nil then
  113. v.Button.TextButton.Text = "GemsGU"
  114. v.Button.TextButton.TextTransparency = 0
  115. v.Button.TextButton.TextScaled = true
  116. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  117. v.Button.TextButton.Position = UDim2.new(0.017,0,0.012,0)
  118. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  119. v.Button.TextButton.BackgroundTransparency = 0
  120. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  121. end
  122. if checkLuck ~= nil then
  123. v.Button.TextButton.Text = "LuckGU"
  124. v.Button.TextButton.TextTransparency = 0
  125. v.Button.TextButton.TextScaled = true
  126. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  127. v.Button.TextButton.Position = UDim2.new(0.043,0,0.012,0)
  128. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  129. v.Button.TextButton.BackgroundTransparency = 0
  130. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  131. end
  132. if checkXP ~= nil then
  133. v.Button.TextButton.Text = "XPGU"
  134. v.Button.TextButton.TextTransparency = 0
  135. v.Button.TextButton.TextScaled = true
  136. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  137. v.Button.TextButton.Position = UDim2.new(0.068,0,0.012,0)
  138. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  139. v.Button.TextButton.BackgroundTransparency = 0
  140. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  141. end
  142. end
  143. end
  144.  
  145. for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.MainUI.UpgradeFrame.UpgradeScroll.RebirthUpgrades.Upgrades:GetChildren()) do
  146. if v.ClassName == "Frame" then
  147. checkTokens = string.find(v.TextLabel.Text,"Tokens")
  148. checkLuck = string.find(v.TextLabel.Text,"Luck")
  149. checkXP = string.find(v.TextLabel.Text,"XP")
  150. if checkTokens ~= nil then
  151. v.Button.TextButton.Text = "TokensRU"
  152. v.Button.TextButton.TextTransparency = 0
  153. v.Button.TextButton.TextScaled = true
  154. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  155. v.Button.TextButton.Position = UDim2.new(0.017,0,0.083,0)
  156. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  157. v.Button.TextButton.BackgroundTransparency = 0
  158. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  159. end
  160. if checkLuck ~= nil then
  161. v.Button.TextButton.Text = "LuckRU"
  162. v.Button.TextButton.TextTransparency = 0
  163. v.Button.TextButton.TextScaled = true
  164. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  165. v.Button.TextButton.Position = UDim2.new(0.043,0,0.083,0)
  166. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  167. v.Button.TextButton.BackgroundTransparency = 0
  168. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  169. end
  170. if checkXP ~= nil then
  171. v.Button.TextButton.Text = "XPRU"
  172. v.Button.TextButton.TextTransparency = 0
  173. v.Button.TextButton.TextScaled = true
  174. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  175. v.Button.TextButton.Position = UDim2.new(0.068,0,0.083,0)
  176. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  177. v.Button.TextButton.BackgroundTransparency = 0
  178. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  179. end
  180. end
  181. end
  182.  
  183. for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.MainUI.UpgradeFrame.UpgradeScroll.PrestigeUpgrades.Upgrades:GetChildren()) do
  184. if v.ClassName == "Frame" then
  185. checkTokens = string.find(v.TextLabel.Text,"Tokens")
  186. checkLuck = string.find(v.TextLabel.Text,"Luck")
  187. checkXP = string.find(v.TextLabel.Text,"XP")
  188. if checkTokens ~= nil then
  189. v.Button.TextButton.Text = "TokensPU"
  190. v.Button.TextButton.TextTransparency = 0
  191. v.Button.TextButton.TextScaled = true
  192. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  193. v.Button.TextButton.Position = UDim2.new(0.017,0,0.152,0)
  194. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  195. v.Button.TextButton.BackgroundTransparency = 0
  196. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  197. end
  198. if checkLuck ~= nil then
  199. v.Button.TextButton.Text = "LuckPU"
  200. v.Button.TextButton.TextTransparency = 0
  201. v.Button.TextButton.TextScaled = true
  202. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  203. v.Button.TextButton.Position = UDim2.new(0.043,0,0.152,0)
  204. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  205. v.Button.TextButton.BackgroundTransparency = 0
  206. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  207. end
  208. if checkXP ~= nil then
  209. v.Button.TextButton.Text = "XPPU"
  210. v.Button.TextButton.TextTransparency = 0
  211. v.Button.TextButton.TextScaled = true
  212. v.Button.TextButton.AnchorPoint = Vector2.new(0.5, 0)
  213. v.Button.TextButton.Position = UDim2.new(0.068,0,0.152,0)
  214. v.Button.TextButton.Size = UDim2.new(0.021,0,0.056,0)
  215. v.Button.TextButton.BackgroundTransparency = 0
  216. v.Button.TextButton.Parent = game:GetService("Players").LocalPlayer.PlayerGui.MainUI
  217. end
  218. end
  219. end
  220.  
  221. spawn(function()
  222. while wait() do
  223. local X = game:GetService("Workspace").CurrentCamera.ViewportSize.X
  224. local Y = game:GetService("Workspace").CurrentCamera.ViewportSize.Y
  225. if GemsGU == true then
  226. if toggle == true then
  227. mousemoveabs(X/60,Y/11.5)
  228. wait() mouse1press() wait() mouse1release() wait()
  229. end
  230. end
  231. if LuckGU == true then
  232. if toggle == true then
  233. mousemoveabs(X/21,Y/11.5)
  234. wait() mouse1press() wait() mouse1release() wait()
  235. end
  236. end
  237. if XPGU == true then
  238. if toggle == true then
  239. mousemoveabs(X/15,Y/11.5)
  240. wait() mouse1press() wait() mouse1release() wait()
  241. end
  242. end
  243. if TokensRU == true then
  244. if toggle == true then
  245. mousemoveabs(X/60,Y/6.5)
  246. wait() mouse1press() wait() mouse1release() wait()
  247. end
  248. end
  249. if LuckRU == true then
  250. if toggle == true then
  251. mousemoveabs(X/21,Y/6.5)
  252. wait() mouse1press() wait() mouse1release() wait()
  253. end
  254. end
  255. if XPRU == true then
  256. if toggle == true then
  257. mousemoveabs(X/15,Y/6.5)
  258. wait() mouse1press() wait() mouse1release() wait()
  259. end
  260. end
  261. if TokensPU == true then
  262. if toggle == true then
  263. mousemoveabs(X/60,Y/4.7)
  264. wait() mouse1press() wait() mouse1release() wait()
  265. end
  266. end
  267. if LuckPU == true then
  268. if toggle == true then
  269. mousemoveabs(X/21,Y/4.7)
  270. wait() mouse1press() wait() mouse1release() wait()
  271. end
  272. end
  273. if XPPU == true then
  274. if toggle == true then
  275. mousemoveabs(X/15,Y/4.7)
  276. wait() mouse1press() wait() mouse1release() wait()
  277. end
  278. end
  279. end
  280. end)
  281.  
  282. game:GetService('RunService').Stepped:connect(function()
  283. spawn(function()
  284. if AntiAfk == true then
  285. local bb=game:service'VirtualUser'
  286. bb:CaptureController()
  287. bb:ClickButton2(Vector2.new())
  288. end
  289. end)
  290. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement