RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"add the hit and stay functions in this script"
-- local script local player = game.Players.LocalPlayer local blackjackGUI = Instance.new("ScreenGui") blackjackGUI.Name = "Blackjack" blackjackGUI.Parent = player.PlayerGui local mainFrame = Instance.new("Frame") mainFrame.Name = "Main" mainFrame.Size = UDim2.new(1,0,1,0) mainFrame.Parent = blackjackGUI -- Create the cards local card1 = Instance.new("ImageLabel") card1.Name = "Card1" card1.Size = UDim2.new(0.2,0,0.2,0) card1.Position = UDim2.new(0.2,0,0.2,0) card1.BackgroundTransparency = 1 card1.Image = "rbxassetid://YourCardImageHere" card1.Parent = mainFrame local card2 = Instance.new("ImageLabel") card2.Name = "Card2" card2.Size = UDim2.new(0.2,0,0.2,0) card2.Position = UDim2.new(0.4,0,0.2,0) card2.BackgroundTransparency = 1 card2.Image = "rbxassetid://YourCardImageHere" card2.Parent = mainFrame -- Create the buttons local hitButton = Instance.new("TextButton") hitButton.Name = "Hit" hitButton.Size = UDim2.new(0.2,0,0.2,0) hitButton.Position = UDim2.new(0.2,0,0.4,0) hitButton.Text = "Hit" hitButton.Parent = mainFrame local stayButton = Instance.new("TextButton") stayButton.Name = "Stay" stayButton.Size = UDim2.new(0.2,0,0.2,0) stayButton.Position = UDim2.new(0.4,0,0.4,0) stayButton.Text = "Stay" stayButton.Parent = mainFrame -- Create the logic local function hit() -- Logic for hitting goes here end local function stay() -- Logic for staying goes here end hitButton.MouseButton1Click:Connect(hit) stayButton.MouseButton1Click:Connect(stay)