1 | link = "https://pastebin.com/raw/CU06Tjg4" |
2 | reason = "Updates." |
3 | while true do |
4 | wait( 1 ) |
5 | if string.gsub(game.HttpService:GetAsync(link), " " , "" ) = = "true" then |
6 | for _, x in pairs (game.Players:GetPlayers()) do x:Kick(reason) end |
7 | end |
8 | end |
I use pastebin to shutdown servers, but sometimes it doesn't work. I made it print the text of the link in the output, and when it didn't work it printed: https://pastebin.com/raw/PgpqzQfn instead of true.
Hello, you should probably use string.find().
1 | link = "https://pastebin.com/raw/CU06Tjg4" |
2 | reason = "Updates." |
3 | while true do |
4 | wait( 1 ) |
5 | if string.find(game.HttpService:GetAsync(link), "true" ) then |
6 | for _, x in pairs (game.Players:GetPlayers()) do x:Kick(reason) end |
7 | end |
8 | end |
Please upvote if this works, Thank you.