Skip to content

Instantly share code, notes, and snippets.

@uyjulian
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uyjulian/9375218 to your computer and use it in GitHub Desktop.
Save uyjulian/9375218 to your computer and use it in GitHub Desktop.
--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