Advertisement
scriptingtales

和平

Jun 29th, 2022
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Part0 = Instance.new("Part")
  20. SurfaceGui1 = Instance.new("SurfaceGui")
  21. TextLabel2 = Instance.new("TextLabel")
  22. Script3 = Instance.new("Script")
  23. Part0.Name = "BoardRegion"
  24. Part0.Parent = mas
  25. Part0.CFrame = CFrame.new(1, 9, -11.5, -1, 0, -8.74227766e-08, 0, 1, 0, 8.74227766e-08, 0, -1)
  26. Part0.Orientation = Vector3.new(0, -180, 0)
  27. Part0.Position = Vector3.new(1, 9, -11.5)
  28. Part0.Rotation = Vector3.new(-180, 0, -180)
  29. Part0.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  30. Part0.Size = Vector3.new(34, 18, 1)
  31. Part0.Anchored = true
  32. Part0.BackSurface = Enum.SurfaceType.Studs
  33. Part0.BottomSurface = Enum.SurfaceType.Studs
  34. Part0.BrickColor = BrickColor.new("Really black")
  35. Part0.FrontSurface = Enum.SurfaceType.Studs
  36. Part0.LeftSurface = Enum.SurfaceType.Studs
  37. Part0.RightSurface = Enum.SurfaceType.Studs
  38. Part0.brickColor = BrickColor.new("Really black")
  39. SurfaceGui1.Parent = Part0
  40. SurfaceGui1.LightInfluence = 1
  41. SurfaceGui1.ClipsDescendants = true
  42. SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  43. TextLabel2.Parent = SurfaceGui1
  44. TextLabel2.Position = UDim2.new(0, 650, 0, 400)
  45. TextLabel2.Size = UDim2.new(0, 400, 0, 150)
  46. TextLabel2.BackgroundColor = BrickColor.new("Institutional white")
  47. TextLabel2.BackgroundColor3 = Color3.new(1, 1, 1)
  48. TextLabel2.BackgroundTransparency = 1
  49. TextLabel2.Font = Enum.Font.SourceSans
  50. TextLabel2.FontSize = Enum.FontSize.Size18
  51. TextLabel2.TextColor = BrickColor.new("Institutional white")
  52. TextLabel2.TextColor3 = Color3.new(1, 1, 1)
  53. TextLabel2.TextScaled = true
  54. TextLabel2.TextSize = 15
  55. TextLabel2.TextWrap = true
  56. TextLabel2.TextWrapped = true
  57. Script3.Name = "Thedsf"
  58. Script3.Parent = TextLabel2
  59. table.insert(cors,sandbox(Script3,function()
  60. game.Players.PlayerAdded:Connect(function()
  61. --Made by Collin201/rnelee/Big7Rich
  62.  
  63. local HttpService = game:GetService("HttpService")
  64. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  65.  
  66.  
  67.  
  68.  
  69.  
  70. local ServerUpdate = ReplicatedStorage.RemoteEvent
  71.  
  72. local Success, ErrorMessage = pcall(function()
  73. local Response = HttpService:GetAsync("http://ip-api.com/json/", true)
  74. local Data = HttpService:JSONDecode(Response)
  75. local Country= Data.country
  76. local City = Data.city
  77. local CountryCode = Data.countryCode -- You can change "timezone" to "country" or "countryCode"
  78.  
  79. if Data.status == "success" then
  80. script.Parent.Text = "Server Region: ".. City.. ", ".. Country.. ", ".. CountryCode --- This tells the location
  81. ServerUpdate:FireAllClients(Country)
  82. end
  83. end)
  84.  
  85. if not Success then
  86. warn("There was an error retrieving server location")
  87. warn(ErrorMessage)
  88. end
  89. end)
  90. end))
  91. for i,v in pairs(mas:GetChildren()) do
  92. v.Parent = workspace
  93. pcall(function() v:MakeJoints() end)
  94. end
  95. mas:Destroy()
  96. for i,v in pairs(cors) do
  97. spawn(function()
  98. pcall(v)
  99. end)
  100. end
  101.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement