Advertisement
Joriangames

Roblox Player Location

Sep 16th, 2022 (edited)
2,853
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. --[[
  2. Thanks for using this script
  3. This script was made by Joriangames/BloxianCode
  4. Want to know how to use this and script explanation?
  5. Check the video here: https://youtu.be/Q_L_qaXgxk0
  6. ]]
  7. local LocalizationS = game:GetService("LocalizationService")
  8. local Player = game.Players.LocalPlayer
  9.  
  10.  
  11. local result, code = pcall(function()
  12.     return LocalizationS:GetCountryRegionForPlayerAsync(Player)
  13. end)
  14.  
  15. print("Player is from: "..code)
  16.  
  17. if result and code == "NL" then
  18.     print("Hello, friend from the Netherlands!")
  19.    
  20.     Player.PlayerGui:WaitForChild("ScreenGui").TextLabel.Text = "You are from the Netherlands, you must follow the new roblox rules"
  21.     Player.PlayerGui.ScreenGui.TextLabel.BackgroundTransparency = 0
  22. else
  23.     print("You are in a safe country")
  24.    
  25.     Player.PlayerGui:WaitForChild("ScreenGui").TextLabel.Text = "You are not from the Netherlands"
  26.     Player.PlayerGui.ScreenGui.TextLabel.BackgroundTransparency = 0
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement