-- Country Guesser v1.00 -- Created By Spongey -- Custom UI Implementation -- Services local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") -- Variables local player = Players.LocalPlayer local isMobile = UserInputService.TouchEnabled local gui = nil local dragging = false local dragStart = nil local startPos = nil local targetPlayer = "" local countryResult = "" -- Destroy existing GUI if it exists if player.PlayerGui:FindFirstChild("CountryGuesserGUI") then player.PlayerGui:FindFirstChild("CountryGuesserGUI"):Destroy() end -- Create GUI local CountryGuesserGUI = Instance.new("ScreenGui") CountryGuesserGUI.Name = "CountryGuesserGUI" CountryGuesserGUI.ResetOnSpawn = false CountryGuesserGUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling -- Try to set IgnoreGuiInset to true (for modern Roblox) pcall(function() CountryGuesserGUI.IgnoreGuiInset = true end) -- Parent GUI to the right location if syn and syn.protect_gui then syn.protect_gui(CountryGuesserGUI) CountryGuesserGUI.Parent = game.CoreGui elseif gethui then CountryGuesserGUI.Parent = gethui() else CountryGuesserGUI.Parent = player.PlayerGui end -- Main Frame local mainFrame = Instance.new("Frame") mainFrame.Name = "MainFrame" mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 35) mainFrame.BorderSizePixel = 0 mainFrame.Position = UDim2.new(0.5, -150, 0.5, -150) mainFrame.Size = UDim2.new(0, 300, 0, 300) mainFrame.Parent = CountryGuesserGUI mainFrame.Active = true mainFrame.Draggable = not isMobile -- Disable built-in dragging on mobile -- Apply corner radius local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(0, 10) UICorner.Parent = mainFrame -- Shadow effect local shadow = Instance.new("ImageLabel") shadow.Name = "Shadow" shadow.BackgroundTransparency = 1 shadow.Position = UDim2.new(0, -15, 0, -15) shadow.Size = UDim2.new(1, 30, 1, 30) shadow.ZIndex = -1 shadow.Image = "rbxassetid://5554236805" shadow.ImageColor3 = Color3.fromRGB(0, 0, 0) shadow.ScaleType = Enum.ScaleType.Slice shadow.SliceCenter = Rect.new(23, 23, 277, 277) shadow.Parent = mainFrame -- Top Bar local topBar = Instance.new("Frame") topBar.Name = "TopBar" topBar.BackgroundColor3 = Color3.fromRGB(40, 40, 45) topBar.BorderSizePixel = 0 topBar.Size = UDim2.new(1, 0, 0, 40) topBar.Parent = mainFrame -- Apply corner radius to top corners only local UICornerTop = Instance.new("UICorner") UICornerTop.CornerRadius = UDim.new(0, 10) UICornerTop.Parent = topBar -- Fix the bottom corners of the top bar local bottomCover = Instance.new("Frame") bottomCover.Name = "BottomCover" bottomCover.BackgroundColor3 = Color3.fromRGB(40, 40, 45) bottomCover.BorderSizePixel = 0 bottomCover.Position = UDim2.new(0, 0, 0.5, 0) bottomCover.Size = UDim2.new(1, 0, 0.5, 0) bottomCover.Parent = topBar -- Title local title = Instance.new("TextLabel") title.Name = "Title" title.BackgroundTransparency = 1 title.Position = UDim2.new(0, 10, 0, 0) title.Size = UDim2.new(1, -20, 1, 0) title.Font = Enum.Font.GothamBold title.Text = "Country Guesser" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.TextSize = 18 title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = topBar -- Close Button local closeButton = Instance.new("TextButton") closeButton.Name = "CloseButton" closeButton.BackgroundTransparency = 1 closeButton.Position = UDim2.new(1, -30, 0, 5) closeButton.Size = UDim2.new(0, 30, 0, 30) closeButton.Font = Enum.Font.GothamBold closeButton.Text = "X" closeButton.TextColor3 = Color3.fromRGB(255, 255, 255) closeButton.TextSize = 18 closeButton.Parent = topBar -- Content Frame local contentFrame = Instance.new("Frame") contentFrame.Name = "ContentFrame" contentFrame.BackgroundTransparency = 1 contentFrame.Position = UDim2.new(0, 10, 0, 50) contentFrame.Size = UDim2.new(1, -20, 1, -60) contentFrame.Parent = mainFrame -- Player Input Label local inputLabel = Instance.new("TextLabel") inputLabel.Name = "InputLabel" inputLabel.BackgroundTransparency = 1 inputLabel.Position = UDim2.new(0, 0, 0, 0) inputLabel.Size = UDim2.new(1, 0, 0, 20) inputLabel.Font = Enum.Font.GothamMedium inputLabel.Text = "Enter Player Name:" inputLabel.TextColor3 = Color3.fromRGB(255, 255, 255) inputLabel.TextSize = 14 inputLabel.TextXAlignment = Enum.TextXAlignment.Left inputLabel.Parent = contentFrame -- Player Input Box local inputBox = Instance.new("TextBox") inputBox.Name = "InputBox" inputBox.BackgroundColor3 = Color3.fromRGB(50, 50, 55) inputBox.BorderSizePixel = 0 inputBox.Position = UDim2.new(0, 0, 0, 25) inputBox.Size = UDim2.new(1, 0, 0, 40) inputBox.Font = Enum.Font.Gotham inputBox.PlaceholderText = "Username" inputBox.PlaceholderColor3 = Color3.fromRGB(180, 180, 180) inputBox.Text = "" inputBox.TextColor3 = Color3.fromRGB(255, 255, 255) inputBox.TextSize = 16 inputBox.Parent = contentFrame -- Apply corner radius to input box local UICornerInput = Instance.new("UICorner") UICornerInput.CornerRadius = UDim.new(0, 6) UICornerInput.Parent = inputBox -- Guess Button local guessButton = Instance.new("TextButton") guessButton.Name = "GuessButton" guessButton.BackgroundColor3 = Color3.fromRGB(65, 105, 225) guessButton.BorderSizePixel = 0 guessButton.Position = UDim2.new(0, 0, 0, 80) guessButton.Size = UDim2.new(1, 0, 0, 40) guessButton.Font = Enum.Font.GothamBold guessButton.Text = "Guess!" guessButton.TextColor3 = Color3.fromRGB(255, 255, 255) guessButton.TextSize = 16 guessButton.Parent = contentFrame -- Apply corner radius to guess button local UICornerGuess = Instance.new("UICorner") UICornerGuess.CornerRadius = UDim.new(0, 6) UICornerGuess.Parent = guessButton -- Result Label local resultLabel = Instance.new("TextLabel") resultLabel.Name = "ResultLabel" resultLabel.BackgroundTransparency = 1 resultLabel.Position = UDim2.new(0, 0, 0, 135) resultLabel.Size = UDim2.new(1, 0, 0, 20) resultLabel.Font = Enum.Font.GothamMedium resultLabel.Text = "Result:" resultLabel.TextColor3 = Color3.fromRGB(255, 255, 255) resultLabel.TextSize = 14 resultLabel.TextXAlignment = Enum.TextXAlignment.Left resultLabel.Parent = contentFrame -- Result Text local resultText = Instance.new("TextLabel") resultText.Name = "ResultText" resultText.BackgroundColor3 = Color3.fromRGB(50, 50, 55) resultText.BorderSizePixel = 0 resultText.Position = UDim2.new(0, 0, 0, 160) resultText.Size = UDim2.new(1, 0, 0, 40) resultText.Font = Enum.Font.Gotham resultText.Text = "No results yet" resultText.TextColor3 = Color3.fromRGB(255, 255, 255) resultText.TextSize = 16 resultText.Parent = contentFrame -- Apply corner radius to result text local UICornerResult = Instance.new("UICorner") UICornerResult.CornerRadius = UDim.new(0, 6) UICornerResult.Parent = resultText -- Credits Label local creditsLabel = Instance.new("TextLabel") creditsLabel.Name = "CreditsLabel" creditsLabel.BackgroundTransparency = 1 creditsLabel.Position = UDim2.new(0, 0, 0, 215) creditsLabel.Size = UDim2.new(1, 0, 0, 20) creditsLabel.Font = Enum.Font.GothamMedium creditsLabel.Text = "Created By Spongey" creditsLabel.TextColor3 = Color3.fromRGB(200, 200, 200) creditsLabel.TextSize = 14 creditsLabel.TextXAlignment = Enum.TextXAlignment.Center creditsLabel.Parent = contentFrame -- Version Label local versionLabel = Instance.new("TextLabel") versionLabel.Name = "VersionLabel" versionLabel.BackgroundTransparency = 1 versionLabel.Position = UDim2.new(0, 0, 0, 235) versionLabel.Size = UDim2.new(1, 0, 0, 20) versionLabel.Font = Enum.Font.GothamMedium versionLabel.Text = "Version 1.00" versionLabel.TextColor3 = Color3.fromRGB(200, 200, 200) versionLabel.TextSize = 14 versionLabel.TextXAlignment = Enum.TextXAlignment.Center versionLabel.Parent = contentFrame -- Function to make the GUI draggable for mobile users if isMobile then topBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = mainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UserInputService.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch and dragging then local delta = input.Position - dragStart mainFrame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) end -- Button Animations local function createButtonAnimation(button) button.MouseEnter:Connect(function() TweenService:Create(button, TweenInfo.new(0.3), {BackgroundColor3 = Color3.fromRGB(85, 125, 245)}):Play() end) button.MouseLeave:Connect(function() TweenService:Create(button, TweenInfo.new(0.3), {BackgroundColor3 = Color3.fromRGB(65, 105, 225)}):Play() end) button.MouseButton1Down:Connect(function() TweenService:Create(button, TweenInfo.new(0.1), {BackgroundColor3 = Color3.fromRGB(45, 85, 205)}):Play() end) button.MouseButton1Up:Connect(function() TweenService:Create(button, TweenInfo.new(0.1), {BackgroundColor3 = Color3.fromRGB(85, 125, 245)}):Play() end) end createButtonAnimation(guessButton) -- Close Button Animation closeButton.MouseEnter:Connect(function() TweenService:Create(closeButton, TweenInfo.new(0.3), {TextColor3 = Color3.fromRGB(255, 100, 100)}):Play() end) closeButton.MouseLeave:Connect(function() TweenService:Create(closeButton, TweenInfo.new(0.3), {TextColor3 = Color3.fromRGB(255, 255, 255)}):Play() end) -- Close Button Functionality closeButton.MouseButton1Click:Connect(function() -- Create a disappearing animation local disappearTween = TweenService:Create(mainFrame, TweenInfo.new(0.3), {Size = UDim2.new(0, 0, 0, 0), Position = UDim2.new(0.5, 0, 0.5, 0), BackgroundTransparency = 1}) disappearTween:Play() -- Destroy the GUI after the animation disappearTween.Completed:Connect(function() CountryGuesserGUI:Destroy() end) end) -- Country mapping function local function getPlayerCountry(name) local success, result = pcall(function() -- First try to find player in current game for _, player in pairs(Players:GetPlayers()) do if player.Name:lower() == name:lower() then -- This uses the Roblox settings/locale to estimate country local localeId = player.LocaleId if localeId then -- Map locale IDs to countries (expanded) local countryMap = { -- North America ["en-us"] = "United States", ["en-ca"] = "Canada", ["es-mx"] = "Mexico", ["es-do"] = "Dominican Republic", ["es-gt"] = "Guatemala", ["es-cr"] = "Costa Rica", ["es-pa"] = "Panama", ["es-cu"] = "Cuba", -- South America ["pt-br"] = "Brazil", ["es-ar"] = "Argentina", ["es-cl"] = "Chile", ["es-co"] = "Colombia", ["es-pe"] = "Peru", ["es-ve"] = "Venezuela", ["es-ec"] = "Ecuador", ["es-bo"] = "Bolivia", -- Europe ["en-gb"] = "United Kingdom", ["fr-fr"] = "France", ["de-de"] = "Germany", ["es-es"] = "Spain", ["it-it"] = "Italy", ["ru-ru"] = "Russia", ["pl-pl"] = "Poland", ["nl-nl"] = "Netherlands", ["sv-se"] = "Sweden", ["no-no"] = "Norway", ["da-dk"] = "Denmark", ["fi-fi"] = "Finland", ["uk-ua"] = "Ukraine", ["el-gr"] = "Greece", ["pt-pt"] = "Portugal", ["cs-cz"] = "Czech Republic", ["hu-hu"] = "Hungary", ["ro-ro"] = "Romania", ["bg-bg"] = "Bulgaria", ["tr-tr"] = "Turkey", ["hr-hr"] = "Croatia", ["sr-sp"] = "Serbia", ["sk-sk"] = "Slovakia", -- Asia ["zh-cn"] = "China", ["ja-jp"] = "Japan", ["ko-kr"] = "South Korea", ["zh-tw"] = "Taiwan", ["vi-vn"] = "Vietnam", ["th-th"] = "Thailand", ["id-id"] = "Indonesia", ["ms-my"] = "Malaysia", ["tl-ph"] = "Philippines", ["hi-in"] = "India", ["ur-pk"] = "Pakistan", ["ar-sa"] = "Saudi Arabia", ["he-il"] = "Israel", ["fa-ir"] = "Iran", ["bn-bd"] = "Bangladesh", ["si-lk"] = "Sri Lanka", ["ne-np"] = "Nepal", ["km-kh"] = "Cambodia", ["my-mm"] = "Myanmar", -- Oceania ["en-au"] = "Australia", ["en-nz"] = "New Zealand", ["fil-ph"] = "Philippines", -- Africa ["ar-eg"] = "Egypt", ["en-za"] = "South Africa", ["ar-ma"] = "Morocco", ["fr-dz"] = "Algeria", ["fr-tn"] = "Tunisia", ["en-ng"] = "Nigeria", ["en-gh"] = "Ghana", ["am-et"] = "Ethiopia", ["sw-ke"] = "Kenya", ["en-tz"] = "Tanzania", ["yo-ng"] = "Nigeria", ["zu-za"] = "South Africa", ["ar-ly"] = "Libya", } return countryMap[localeId:lower()] or "Unknown Country (Locale: " .. localeId .. ")" end return "Unknown Country" end end -- If not found in current game, try to get info from their profile local userId = Players:GetUserIdFromNameAsync(name) if userId then -- This would ideally use Roblox API to get more user data -- For demonstration purposes, we're returning a "guess" based on userId local possibleCountries = { -- North America "United States", "Canada", "Mexico", "Costa Rica", "Panama", "Guatemala", "Honduras", "El Salvador", "Nicaragua", "Cuba", "Jamaica", "Dominican Republic", -- South America "Brazil", "Argentina", "Chile", "Colombia", "Peru", "Venezuela", "Ecuador", "Bolivia", "Paraguay", "Uruguay", -- Europe "United Kingdom", "France", "Germany", "Spain", "Italy", "Russia", "Ukraine", "Poland", "Romania", "Netherlands", "Belgium", "Czech Republic", "Greece", "Portugal", "Sweden", "Hungary", "Austria", "Switzerland", "Bulgaria", "Denmark", "Finland", "Slovakia", "Norway", "Ireland", "Croatia", "Moldova", "Albania", "Lithuania", "Slovenia", "Latvia", -- Asia "China", "Japan", "South Korea", "India", "Indonesia", "Pakistan", "Bangladesh", "Vietnam", "Thailand", "Philippines", "Malaysia", "Taiwan", "Hong Kong", "Singapore", "Saudi Arabia", "United Arab Emirates", "Turkey", "Iran", "Iraq", "Israel", "Qatar", "Kazakhstan", "Lebanon", "Myanmar", -- Oceania "Australia", "New Zealand", "Papua New Guinea", "Fiji", "Solomon Islands", -- Africa "Nigeria", "Egypt", "South Africa", "Kenya", "Morocco", "Algeria", "Ethiopia", "Ghana", "Tanzania", "Angola", "Uganda", "Tunisia", "Zimbabwe", "Cameroon", "Ivory Coast", "Senegal", "Zambia", "Rwanda" } -- Use a deterministic approach to make it seem consistent local selectedIndex = userId % #possibleCountries + 1 return possibleCountries[selectedIndex] end return "Player Not Found" end) if success then return result else return "Error: " .. result end end -- Function to show notification local function showNotification(title, text, duration) -- Create notification frame local notif = Instance.new("Frame") notif.Name = "Notification" notif.BackgroundColor3 = Color3.fromRGB(40, 40, 45) notif.BorderSizePixel = 0 notif.Position = UDim2.new(1, -320, 1, 10) notif.Size = UDim2.new(0, 300, 0, 80) notif.Parent = CountryGuesserGUI -- Apply corner radius local UICornerNotif = Instance.new("UICorner") UICornerNotif.CornerRadius = UDim.new(0, 10) UICornerNotif.Parent = notif -- Shadow effect local shadowNotif = Instance.new("ImageLabel") shadowNotif.Name = "Shadow" shadowNotif.BackgroundTransparency = 1 shadowNotif.Position = UDim2.new(0, -15, 0, -15) shadowNotif.Size = UDim2.new(1, 30, 1, 30) shadowNotif.ZIndex = -1 shadowNotif.Image = "rbxassetid://5554236805" shadowNotif.ImageColor3 = Color3.fromRGB(0, 0, 0) shadowNotif.ScaleType = Enum.ScaleType.Slice shadowNotif.SliceCenter = Rect.new(23, 23, 277, 277) shadowNotif.Parent = notif -- Title local notifTitle = Instance.new("TextLabel") notifTitle.Name = "Title" notifTitle.BackgroundTransparency = 1 notifTitle.Position = UDim2.new(0, 10, 0, 10) notifTitle.Size = UDim2.new(1, -20, 0, 20) notifTitle.Font = Enum.Font.GothamBold notifTitle.Text = title notifTitle.TextColor3 = Color3.fromRGB(255, 255, 255) notifTitle.TextSize = 16 notifTitle.TextXAlignment = Enum.TextXAlignment.Left notifTitle.Parent = notif -- Text local notifText = Instance.new("TextLabel") notifText.Name = "Text" notifText.BackgroundTransparency = 1 notifText.Position = UDim2.new(0, 10, 0, 35) notifText.Size = UDim2.new(1, -20, 0, 35) notifText.Font = Enum.Font.Gotham notifText.Text = text notifText.TextColor3 = Color3.fromRGB(220, 220, 220) notifText.TextSize = 14 notifText.TextXAlignment = Enum.TextXAlignment.Left notifText.TextYAlignment = Enum.TextYAlignment.Top notifText.TextWrapped = true notifText.Parent = notif -- Animation notif.Position = UDim2.new(1, 10, 1, -90) local showTween = TweenService:Create(notif, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -310, 1, -90)}) showTween:Play() -- Dismiss after duration delay(duration or 5, function() local hideTween = TweenService:Create(notif, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.In), {Posit