Last active
August 29, 2015 13:57
-
-
Save uyjulian/9375218 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Dogecoin checker | |
local httpService = game:GetService("HttpService"); | |
local currentDogecoin = 0; | |
local amountString; | |
local dogecoinAddress = "D8ZyeW3ZwEbN936N4svKM8emc2cm8UNcnn"; | |
local apiAddress = "http://dogechain.info/chain/Dogecoin/q/addressbalance/" .. dogecoinAddress; | |
local DogecoinValue = { | |
RECIEVED = 0, | |
UNCHANGED = 1, | |
SENT = 2 | |
}; | |
local status = DogecoinValue.UNCHANGED; | |
while true do | |
wait(60); | |
amountString = httpService:GetAsync(apiAddress, true); | |
local tempDogecoin = tonumber(amountString); | |
if tempDogecoin >= currentDogecoin then | |
status = DogecoinValue.RECIEVED; | |
elseif tempDogecoin <= currentDogecoin then | |
status = DogecoinValue.SENT; | |
elseif tempDogecoin == currentDogecoin then | |
status = DogecoinValue.UNCHANGED; | |
end | |
currentDogecoin = tempDogecoin; | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment