Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Game: https://www.roblox.com/games/1689414409/Roblox-Uno
- --https://detourious.gitbook.io/project-finity/docs
- if game:GetService("CoreGui"):FindFirstChild("FinityUI") then
- game.CoreGui.FinityUI:Destroy()
- end
- local desc = [[
- Not a perfect auto/ai but here ye go :D
- ]]
- local plr = game.Players.LocalPlayer
- local Finity = loadstring(game:HttpGet("https://pastebin.com/raw/x5p1kPw1"))()
- local FinityWindow = Finity.new(true)
- FinityWindow.ChangeToggleKey(Enum.KeyCode.Semicolon)
- local CreditsCategory = FinityWindow:Category("Credits/Info")
- local CreditsCreator = CreditsCategory:Sector("Finity Library Creator:")
- local ScriptCredit = CreditsCategory:Sector("Cheat Credit:")
- local Description = CreditsCategory:Sector("Description:")
- local OC = CreditsCategory:Sector("Open Close Button:")
- CreditsCreator:Cheat("Label", "detourious @ v3rmillion.net")
- ScriptCredit:Cheat("Label", "brianops16 @ v3rmillion.net")
- Description:Cheat("Label", desc)
- local Cheats = FinityWindow:Category("Cheats")
- local S1 = Cheats:Sector("Main AI")
- local S2 = Cheats:Sector("Lobby Settings")
- local EnumKeys = {'Semicolon','Tab','Equals','Comma','Minus','Period','F1',"F2","F3","F4",'F5',"F6","F7",
- "F8","F9","F10","F11","F12",'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H',
- 'J', 'K', 'L', 'Z', 'X', 'C', 'V', 'B', 'N', 'M','Slash','One','Two','Three',"Four","Five","Six","Seven","Eight",
- "Nine","Zero",'BackSlash','RightBracket','LeftBracket'}
- OC:Cheat("Dropdown", "(Default ';')", function(Option) --Dropdowns
- print('Current key: '..Option)
- FinityWindow.ChangeToggleKey(Enum.KeyCode[Option])
- end, {
- options = EnumKeys
- })
- local PlayedCard = false
- local Cam = game.Workspace.CurrentCamera
- local ui = plr.PlayerGui.MatchMaker.MainFrame
- local MinAmt = 2
- local StartingCards = 7
- local MakeLobby = false
- local Singleplayer = false
- local LoadedOptions = {[1] = "+4 Mania",[2] = "Reverse Reverse",[3] = "Stacking",[4] = "Draw To Match"}
- local LobbyOptions = {"None","+4 Mania","Reverse Reverse","Stacking","Draw To Match"}
- S2:Cheat("Checkbox","Auto make lobbies",
- function(State)
- if not State then
- MakeLobby = false
- else
- MakeLobby = true
- end
- end
- )
- S2:Cheat("Checkbox","Use Singleplayer lobbies",
- function(State)
- if not State then
- Singleplayer = false
- else
- Singleplayer = true
- end
- end
- )
- S2:Cheat("Textbox", "Min amt of players needed", function(Value) --Textbox
- if not pcall(function()
- local Val = tonumber(Value)
- if Val > 4 or Val < 2 then
- MinAmt = 2
- else
- MinAmt = Val
- end
- end) then
- MinAmt = 2
- end
- end, {
- placeholder = "2 (Max 4 | Min 2)"
- })
- S2:Cheat("Textbox", "Starting Amt of Cards", function(Value) --Textbox
- if not pcall(function()
- local Val = tonumber(Value)
- if Val > 15 or Val < 3 then
- StartingCards = 7
- else
- StartingCards = Val
- end
- end) then
- StartingCards = 7
- end
- end, {
- placeholder = "7 (3-15)"
- })
- local AddonLabel = S2:Cheat("Label", "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4])
- S2:Cheat("Dropdown", "Game Rule Addon 1", function(Option) --Dropdowns
- LoadedOptions[1] = Option
- AddonLabel.label.Text = "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4]
- end, {
- options = LobbyOptions
- })
- S2:Cheat("Dropdown", "Game Rule Addon 2", function(Option) --Dropdowns
- LoadedOptions[2] = Option
- AddonLabel.label.Text = "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4]
- end, {
- options = LobbyOptions
- })
- S2:Cheat("Dropdown", "Game Rule Addon 3", function(Option) --Dropdowns
- LoadedOptions[3] = Option
- AddonLabel.label.Text = "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4]
- end, {
- options = LobbyOptions
- })
- S2:Cheat("Dropdown", "Game Rule Addon 4", function(Option) --Dropdowns
- LoadedOptions[4] = Option
- AddonLabel.label.Text = "Current Addons: "..LoadedOptions[1]..", "..LoadedOptions[2]..", "..LoadedOptions[3]..", "..LoadedOptions[4]
- end, {
- options = LobbyOptions
- })
- S1:Cheat("Checkbox","Auto",
- function(State)
- if not State then
- _G.on = 0
- else
- _G.on = 1
- while _G.on == 1 do
- local g,b = pcall(function()
- if #Cam.PlrData:GetChildren() == 0 then
- if MakeLobby then
- if not Singleplayer then
- MatchMake(3)
- else
- MatchMake(1)
- end
- end
- else
- local Message = PlayACard()
- if PlayedCard then PlayedCard = false end
- if Message then
- print(Message)
- end
- wait(1)
- repeat wait(.1) until ui.YourData.Nam.PlrImage.Timer.Text ~= "" or #Cam.PlrData:GetChildren() == 0
- end
- end)
- if b then print(b) end
- wait(.5)
- end
- end
- end
- )
- function MatchMake(Type)
- wait(1)
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, false)
- wait(1)
- local UsedTable = {}
- local Count = 0
- for i,v in pairs(LoadedOptions) do
- if v ~= "None" then
- Count = Count + 1
- UsedTable[Count] = v
- end
- end
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(true, Type, "Light Blue", nil, "None", tostring(StartingCards), UsedTable)
- wait(1)
- if Type == 3 then
- repeat wait(2) until #game.ReplicatedStorage.Matches[plr.Name].Players:GetChildren() >= MinAmt
- end
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, false, "Start")
- repeat wait(.1) until ui.YourData.Nam.PlrImage.Timer.Text ~= ""
- end
- function PlayACard()
- ui = plr.PlayerGui.MatchMaker.MainFrame
- local g,b = pcall(function()
- local Data = Cam.PlrData
- local Deck = ui.YourDeck
- local Playable = {}
- for i,v in pairs(Deck:GetChildren()) do
- if v.SelBut.Text ~= "Can't Play" then
- table.insert(Playable,v)
- end
- end
- if #Playable < 1 then
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "Draw",[2] = ""})
- wait(.5)
- repeat wait() until ui.YourData.Nam.PlrImage.Timer.Text ~= ""
- wait(.5)
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "Play"})
- wait(.3)
- local Highest = FindHighest()
- local ColorNumber = {["Red"] = 1,["Yellow"] = 2,["Green"] = 3,["Blue"] = 4,["Wild"] = math.random(1,4)}
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "ColorPick",[2] = ColorNumber[Highest]})
- return
- end
- local CloseToUno = false
- for i,v in pairs(Data:GetChildren()) do
- if v.Name ~= plr.Name and v.Name ~= "Deck" then
- local Counter = 0
- for a,b in pairs(v:GetChildren()) do
- if b:IsA("Part") then
- Counter = Counter + 1
- end
- end
- if Counter <= 4 then
- CloseToUno = true
- break
- end
- end
- end
- --12 = +2
- --11 = skip
- --13 = reverse
- if not CloseToUno then
- local NewPlayable = {}
- for i,v in pairs(Playable) do
- local Num = v.Tag.Tag
- pcall(function()
- if Num.Value ~= "" and tonumber(Num.Value) and tonumber(Num.Value) >= 0 and tonumber(Num.Value) <= 13 then
- table.insert(NewPlayable,v)
- end
- end)
- end
- if #NewPlayable > 0 then
- Playable = NewPlayable
- local Highest = FindHighest()
- local WillPlay = {[1] = {},[2] = {},[3] = {}} --Priority System
- for i,v in pairs(Playable) do
- local Color = v.Tag.Value
- local Num = v.Tag.Tag.Value
- local Similar = FindSimilar(Num,Color)
- if Similar then
- table.insert(WillPlay[3],v) --Has a similar card, will play last
- elseif Num and tonumber(Num) < 10 then
- table.insert(WillPlay[1],v) --Just a random 0-9 card, will play first
- else
- table.insert(WillPlay[2],v) --A special card, will play if there are no 0-9 cards
- end
- end
- for i,v in pairs(WillPlay) do
- if #v > 0 then
- for a,b in pairs(v) do
- if b.Tag.Value == Highest then
- Play(b)
- break
- end
- end
- Play(v[1])
- break
- end
- end
- else
- Play(Playable[1])
- end
- else
- local WillPlay = {[1] = {},[2] = {},[3] = {},[4] = {}}
- for i,v in pairs(Playable) do
- local Color = v.Tag.Value
- local Num = v.Tag.Tag.Value
- if v then
- if Color == "+4" then
- table.insert(WillPlay[1],v)
- break
- elseif Num and Num ~= "" and tonumber(Num) == 12 then
- table.insert(WillPlay[2],v)
- elseif Num and Num ~= "" and tonumber(Num) > 10 then
- table.insert(WillPlay[3],v)
- else
- table.insert(WillPlay[4],v)
- end
- end
- end
- for i,v in pairs(WillPlay) do
- if #v > 0 then
- Play(v[1])
- end
- end
- end
- end)
- if b then
- return b
- end
- return nil
- end
- function Play(Card)
- if PlayedCard then return end
- wait(.5)
- Uno = false
- if ui.Uno.Position == UDim2.new(0,0,0,0) then
- Uno = true
- end
- if not Card then
- print("Card passed through function Play was nil for some reason??? Please fix :(")
- local Data = Cam.PlrData
- local Deck = ui.YourDeck
- local Playable = {}
- for i,v in pairs(Deck:GetChildren()) do
- if v.SelBut.Text ~= "Can't Play" then
- table.insert(Playable,v)
- end
- end
- Card = Playable[1]
- end
- PlayedCard = true
- local Num = Card.Tag.Tag.Value
- local Color = Card.Tag.Value
- local Highest = FindHighest()
- local ColorNumber = {["Red"] = 1,["Yellow"] = 2,["Green"] = 3,["Blue"] = 4,["Wild"] = math.random(1,4)}
- if Color == "+4" then
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "+4",[2] = "",[3] = Uno})
- wait()
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "ColorPick",[2] = ColorNumber[Highest]})
- elseif Color == "wild" then
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "wild",[2] = "",[3] = Uno})
- wait()
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = "ColorPick",[2] = ColorNumber[Highest]})
- else
- if type(Num) == "number" then
- Num = tostring(Num)
- end
- game:GetService("ReplicatedStorage").MatchMaker:FireServer(false, "PlayCard", {[1] = Color,[2] = Num,[3] = Uno})
- end
- end
- function FindSimilar(Num,Color)
- for i,v in pairs(ui.YourDeck:GetChildren()) do
- 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
- return v
- end
- end
- return nil
- end
- function FindHighest()
- --This is done to find what the most amount of a color you would have
- --This is because we want to be playing with the most amount of cards when possible
- local R,G,B,Y = 0,0,0,0
- local Highest,High = 0,nil
- for i,v in pairs(ui.YourDeck:GetChildren()) do
- if v.Tag.Value == "Red" then
- R = R + 1
- if R > Highest then Highest = R High = "Red" end
- elseif v.Tag.Value == "Green" then
- G = G + 1
- if G > Highest then Highest = G High = "Green" end
- elseif v.Tag.Value == "Blue" then
- B = B + 1
- if B > Highest then Highest = B High = "Blue" end
- elseif v.Tag.Value == "Yellow" then
- Y = Y + 1
- if Y > Highest then Highest = Y High = "Yellow" end
- end
- end
- if (R+G+B+Y) == 0 then
- return "Wild"
- else
- return High
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement