Advertisement
Graizy

Untitled

Apr 15th, 2022
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.90 KB | None | 0 0
  1.  
  2.  
  3. --Game: https://www.roblox.com/games/1689414409/Roblox-Uno
  4.  
  5. --https://detourious.gitbook.io/project-finity/docs
  6. if game:GetService("CoreGui"):FindFirstChild("FinityUI") then
  7. game.CoreGui.FinityUI:Destroy()
  8. end
  9. local desc = [[
  10. Not a perfect auto/ai but here ye go :D
  11. ]]
  12. local plr = game.Players.LocalPlayer
  13. local Finity = loadstring(game:HttpGet("https://pastebin.com/raw/x5p1kPw1"))()
  14. local FinityWindow = Finity.new(true)
  15. FinityWindow.ChangeToggleKey(Enum.KeyCode.Semicolon)
  16. local CreditsCategory = FinityWindow:Category("Credits/Info")
  17. local CreditsCreator = CreditsCategory:Sector("Finity Library Creator:")
  18. local ScriptCredit = CreditsCategory:Sector("Cheat Credit:")
  19. local Description = CreditsCategory:Sector("Description:")
  20. local OC = CreditsCategory:Sector("Open Close Button:")
  21. CreditsCreator:Cheat("Label", "detourious @ v3rmillion.net")
  22. ScriptCredit:Cheat("Label", "brianops16 @ v3rmillion.net")
  23. Description:Cheat("Label", desc)
  24. local Cheats = FinityWindow:Category("Cheats")
  25. local S1 = Cheats:Sector("Main AI")
  26. local S2 = Cheats:Sector("Lobby Settings")
  27. local EnumKeys = {'Semicolon','Tab','Equals','Comma','Minus','Period','F1',"F2","F3","F4",'F5',"F6","F7",
  28. "F8","F9","F10","F11","F12",'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H',
  29. 'J', 'K', 'L', 'Z', 'X', 'C', 'V', 'B', 'N', 'M','Slash','One','Two','Three',"Four","Five","Six","Seven","Eight",
  30. "Nine","Zero",'BackSlash','RightBracket','LeftBracket'}
  31. OC:Cheat("Dropdown", "(Default ';')", function(Option) --Dropdowns
  32. print('Current key: '..Option)
  33. FinityWindow.ChangeToggleKey(Enum.KeyCode[Option])
  34. end, {
  35. options = EnumKeys
  36. })
  37.  
  38. local PlayedCard = false
  39. local Cam = game.Workspace.CurrentCamera
  40. local ui = plr.PlayerGui.MatchMaker.MainFrame
  41. local MinAmt = 2
  42. local StartingCards = 7
  43. local MakeLobby = false
  44. local Singleplayer = false
  45. local LoadedOptions = {[1] = "+4 Mania",[2] = "Reverse Reverse",[3] = "Stacking",[4] = "Draw To Match"}
  46. local LobbyOptions = {"None","+4 Mania","Reverse Reverse","Stacking","Draw To Match"}
  47.  
  48.  
  49. S2:Cheat("Checkbox","Auto make lobbies",
  50. function(State)
  51. if not State then
  52. MakeLobby = false
  53. else
  54. MakeLobby = true
  55. end
  56. end
  57. )
  58.  
  59. S2:Cheat("Checkbox","Use Singleplayer lobbies",
  60. function(State)
  61. if not State then
  62. Singleplayer = false
  63. else
  64. Singleplayer = true
  65. end
  66. end
  67. )
  68.  
  69. S2:Cheat("Textbox", "Min amt of players needed", function(Value) --Textbox
  70. if not pcall(function()
  71. local Val = tonumber(Value)
  72. if Val > 4 or Val < 2 then
  73. MinAmt = 2
  74. else
  75. MinAmt = Val
  76. end
  77. end) then
  78. MinAmt = 2
  79. end
  80. end, {
  81. placeholder = "2 (Max 4 | Min 2)"
  82. })
  83.  
  84. S2:Cheat("Textbox", "Starting Amt of Cards", function(Value) --Textbox
  85. if not pcall(function()
  86. local Val = tonumber(Value)
  87. if Val > 15 or Val < 3 then
  88. StartingCards = 7
  89. else
  90. StartingCards = Val
  91. end
  92. end) then
  93. StartingCards = 7
  94. end
  95. end, {
  96. placeholder = "7 (3-15)"
  97. })
  98.  
  99. local AddonLabel = S2:Cheat("Label", "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4])
  100.  
  101. S2:Cheat("Dropdown", "Game Rule Addon 1", function(Option) --Dropdowns
  102. LoadedOptions[1] = Option
  103. AddonLabel.label.Text = "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4]
  104. end, {
  105. options = LobbyOptions
  106. })
  107.  
  108. S2:Cheat("Dropdown", "Game Rule Addon 2", function(Option) --Dropdowns
  109. LoadedOptions[2] = Option
  110. AddonLabel.label.Text = "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4]
  111. end, {
  112. options = LobbyOptions
  113. })
  114.  
  115. S2:Cheat("Dropdown", "Game Rule Addon 3", function(Option) --Dropdowns
  116. LoadedOptions[3] = Option
  117. AddonLabel.label.Text = "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4]
  118. end, {
  119. options = LobbyOptions
  120. })
  121.  
  122. S2:Cheat("Dropdown", "Game Rule Addon 4", function(Option) --Dropdowns
  123. LoadedOptions[4] = Option
  124. AddonLabel.label.Text = "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4]
  125. end, {
  126. options = LobbyOptions
  127. })
  128.  
  129.  
  130.  
  131. S1:Cheat("Checkbox","Auto",
  132. function(State)
  133. if not State then
  134. _G.on = 0
  135. else
  136. _G.on = 1
  137. while _G.on == 1 do
  138. local g,b = pcall(function()
  139. if #Cam.PlrData:GetChildren() == 0 then
  140. if MakeLobby then
  141. if not Singleplayer then
  142. MatchMake(3)
  143. else
  144. MatchMake(1)
  145. end
  146. end
  147. else
  148. local Message = PlayACard()
  149. if PlayedCard then PlayedCard = false end
  150. if Message then
  151. print(Message)
  152. end
  153. wait(1)
  154. repeat wait(.1) until ui.YourData.Nam.PlrImage.Timer.Text ~= "" or #Cam.PlrData:GetChildren() == 0
  155. end
  156. end)
  157. if b then print(b) end
  158. wait(.5)
  159. end
  160. end
  161. end
  162. )
  163.  
  164.  
  165. function MatchMake(Type)
  166. wait(1)
  167. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, false)
  168. wait(1)
  169. local UsedTable = {}
  170. local Count = 0
  171. for i,v in pairs(LoadedOptions) do
  172. if v ~= "None" then
  173. Count = Count + 1
  174. UsedTable[Count] = v
  175. end
  176. end
  177. game:GetService("ReplicatedStorage").MatchMaker:FireServer(true, Type, "Light Blue", nil, "None", tostring(StartingCards), UsedTable)
  178. wait(1)
  179. if Type == 3 then
  180. repeat wait(2) until #game.ReplicatedStorage.Matches[plr.Name].Players:GetChildren() >= MinAmt
  181. end
  182. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, false, "Start")
  183. repeat wait(.1) until ui.YourData.Nam.PlrImage.Timer.Text ~= ""
  184. end
  185.  
  186.  
  187. function PlayACard()
  188. ui = plr.PlayerGui.MatchMaker.MainFrame
  189. local g,b = pcall(function()
  190. local Data = Cam.PlrData
  191. local Deck = ui.YourDeck
  192. local Playable = {}
  193. for i,v in pairs(Deck:GetChildren()) do
  194. if v.SelBut.Text ~= "Can't Play" then
  195. table.insert(Playable,v)
  196. end
  197. end
  198.  
  199. if #Playable < 1 then
  200. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "Draw",[2] = ""})
  201. wait(.5)
  202. repeat wait() until ui.YourData.Nam.PlrImage.Timer.Text ~= ""
  203. wait(.5)
  204. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "Play"})
  205. wait(.3)
  206. local Highest = FindHighest()
  207. local ColorNumber = {["Red"] = 1,["Yellow"] = 2,["Green"] = 3,["Blue"] = 4,["Wild"] = math.random(1,4)}
  208. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "ColorPick",[2] = ColorNumber[Highest]})
  209. return
  210. end
  211.  
  212.  
  213. local CloseToUno = false
  214.  
  215. for i,v in pairs(Data:GetChildren()) do
  216. if v.Name ~= plr.Name and v.Name ~= "Deck" then
  217. local Counter = 0
  218. for a,b in pairs(v:GetChildren()) do
  219. if b:IsA("Part") then
  220. Counter = Counter + 1
  221. end
  222. end
  223. if Counter <= 4 then
  224. CloseToUno = true
  225. break
  226. end
  227. end
  228. end
  229. --12 = +2
  230. --11 = skip
  231. --13 = reverse
  232. if not CloseToUno then
  233. local NewPlayable = {}
  234. for i,v in pairs(Playable) do
  235. local Num = v.Tag.Tag
  236. pcall(function()
  237. if Num.Value ~= "" and tonumber(Num.Value) and tonumber(Num.Value) >= 0 and tonumber(Num.Value) <= 13 then
  238. table.insert(NewPlayable,v)
  239. end
  240. end)
  241. end
  242. if #NewPlayable > 0 then
  243. Playable = NewPlayable
  244. local Highest = FindHighest()
  245. local WillPlay = {[1] = {},[2] = {},[3] = {}} --Priority System
  246. for i,v in pairs(Playable) do
  247. local Color = v.Tag.Value
  248. local Num = v.Tag.Tag.Value
  249. local Similar = FindSimilar(Num,Color)
  250. if Similar then
  251. table.insert(WillPlay[3],v) --Has a similar card, will play last
  252. elseif Num and tonumber(Num) < 10 then
  253. table.insert(WillPlay[1],v) --Just a random 0-9 card, will play first
  254. else
  255. table.insert(WillPlay[2],v) --A special card, will play if there are no 0-9 cards
  256. end
  257. end
  258. for i,v in pairs(WillPlay) do
  259. if #v > 0 then
  260. for a,b in pairs(v) do
  261. if b.Tag.Value == Highest then
  262. Play(b)
  263. break
  264. end
  265. end
  266. Play(v[1])
  267. break
  268. end
  269. end
  270. else
  271. Play(Playable[1])
  272. end
  273. else
  274. local WillPlay = {[1] = {},[2] = {},[3] = {},[4] = {}}
  275. for i,v in pairs(Playable) do
  276. local Color = v.Tag.Value
  277. local Num = v.Tag.Tag.Value
  278. if v then
  279. if Color == "+4" then
  280. table.insert(WillPlay[1],v)
  281. break
  282. elseif Num and Num ~= "" and tonumber(Num) == 12 then
  283. table.insert(WillPlay[2],v)
  284. elseif Num and Num ~= "" and tonumber(Num) > 10 then
  285. table.insert(WillPlay[3],v)
  286. else
  287. table.insert(WillPlay[4],v)
  288. end
  289. end
  290. end
  291. for i,v in pairs(WillPlay) do
  292. if #v > 0 then
  293. Play(v[1])
  294. end
  295. end
  296. end
  297. end)
  298. if b then
  299. return b
  300. end
  301. return nil
  302. end
  303.  
  304. function Play(Card)
  305. if PlayedCard then return end
  306. wait(.5)
  307. Uno = false
  308. if ui.Uno.Position == UDim2.new(0,0,0,0) then
  309. Uno = true
  310. end
  311. if not Card then
  312. print("Card passed through function Play was nil for some reason??? Please fix :(")
  313. local Data = Cam.PlrData
  314. local Deck = ui.YourDeck
  315. local Playable = {}
  316. for i,v in pairs(Deck:GetChildren()) do
  317. if v.SelBut.Text ~= "Can't Play" then
  318. table.insert(Playable,v)
  319. end
  320. end
  321. Card = Playable[1]
  322. end
  323. PlayedCard = true
  324. local Num = Card.Tag.Tag.Value
  325. local Color = Card.Tag.Value
  326. local Highest = FindHighest()
  327. local ColorNumber = {["Red"] = 1,["Yellow"] = 2,["Green"] = 3,["Blue"] = 4,["Wild"] = math.random(1,4)}
  328. if Color == "+4" then
  329. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "+4",[2] = "",[3] = Uno})
  330. wait()
  331. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "ColorPick",[2] = ColorNumber[Highest]})
  332. elseif Color == "wild" then
  333. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "wild",[2] = "",[3] = Uno})
  334. wait()
  335. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "ColorPick",[2] = ColorNumber[Highest]})
  336. else
  337. if type(Num) == "number" then
  338. Num = tostring(Num)
  339. end
  340. game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = Color,[2] = Num,[3] = Uno})
  341. end
  342. end
  343.  
  344. function FindSimilar(Num,Color)
  345. for i,v in pairs(ui.YourDeck:GetChildren()) do
  346. if v.Tag.Value ~= Color and (v.Tag.Value == "Red" or v.Tag.Value == "Green" or v.Tag.Value == "Blue" or v.Tag.Value == "Yellow") and v.Tag.Tag.Value == Num then
  347. return v
  348. end
  349. end
  350. return nil
  351. end
  352.  
  353. function FindHighest()
  354. --This is done to find what the most amount of a color you would have
  355. --This is because we want to be playing with the most amount of cards when possible
  356. local R,G,B,Y = 0,0,0,0
  357. local Highest,High = 0,nil
  358. for i,v in pairs(ui.YourDeck:GetChildren()) do
  359. if v.Tag.Value == "Red" then
  360. R = R + 1
  361. if R > Highest then Highest = R High = "Red" end
  362. elseif v.Tag.Value == "Green" then
  363. G = G + 1
  364. if G > Highest then Highest = G High = "Green" end
  365. elseif v.Tag.Value == "Blue" then
  366. B = B + 1
  367. if B > Highest then Highest = B High = "Blue" end
  368. elseif v.Tag.Value == "Yellow" then
  369. Y = Y + 1
  370. if Y > Highest then Highest = Y High = "Yellow" end
  371. end
  372. end
  373. if (R+G+B+Y) == 0 then
  374. return "Wild"
  375. else
  376. return High
  377. end
  378. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement