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:
string
The code of the country e.g US
Name
Country.Name:
string
Contains the name of the country e.g US = "United States"
Emoji
Country.Emoji:
string
Contains the emoji of the country e.g US = 🇺🇸
Decal
Country.Decal:
string
Contains the flag of the emoji, it can be used for ImageLabels, Decals and ImageButtons!