Country
Contains the data for each country of this library. It is used to retrieve information such as a decal, emoji and name of a country to display it to the user.
local CountryService = require(ReplicatedStorage.CountryService)
local country: CountryService.Country = CountryService:GetMyCountry()
--Set the UI
local screenGui: ScreenGui = playerGui:WaitForChild("Country") :: ScreenGui
local container: Frame = screenGui:WaitForChild("Container") :: Frame
local countryFlag: ImageLabel = container:WaitForChild("CountryFlag") :: ImageLabel
local countryInfo: TextLabel = container:WaitForChild("CountryInfo") :: TextLabel
countryFlag.Image = country.decal
countryInfo.Text = `Hi! Welcome from {country.name} {country.emoji}`
Properties
Code
Country.Code: stringThe code of the country e.g US
Name
Country.Name: stringContains the name of the country e.g US = "United States"
Emoji
Country.Emoji: stringContains the emoji of the country e.g US = 🇺🇸
Decal
Country.Decal: stringContains the flag of the emoji, it can be used for ImageLabels, Decals and ImageButtons!