-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLikeGoal
52 lines (41 loc) · 1.43 KB
/
LikeGoal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--[[local likegetter = require(script:WaitForChild("LikeGetter"))
likegetter:Init("AKfycbzSQors3osHh_Abi4nNkUD-326vxQg076A8iE7vTbl1LNOCo5_k")
local LikeGoal = 5000
while true do
local likes = likegetter:GetLikes()
warn(likes)
local ratio = likes/LikeGoal
script.Parent.Size = UDim2.new(ratio,0,0.2,0)
script.Parent.Text = likes
task.wait(60)
end]]
task.wait(10)
local HttpService = game:GetService("HttpService")
local UniverseId = game.GameId
local shortener = require(game:GetService("ReplicatedStorage"):WaitForChild("Modules"):WaitForChild("ShortenNumber"))
while true do
local suc, err = pcall(function()
local response = HttpService:RequestAsync({
Url = "https://rprxy.deta.dev/games/v1/games/votes?universeIds="..UniverseId,
Method = "GET"
})
if response.Success then
local votes = HttpService:JSONDecode(response.Body)
local amt = votes.data[1].upVotes
amt = 10000
local goal = (math.round((amt + 5000) / 1000) * 1000) * 1 -- haha nermis ur useless whydid u add x1
script.Parent.Parent.TextLabel.Text = "NEXT UPDATE: "..tostring(shortener.Shorten(goal)).." LIKES"
local ratio = amt/goal
if ratio <= 1 then
script.Parent.Size = UDim2.new(ratio,0,0.2,0)
else
script.Parent.Size = UDim2.new(1,0,0.2,0)
end
script.Parent.Text = shortener.Shorten(amt)
else
script.Parent.Text = "A LOTTA LIKES!!1!111!1"
script.Parent.Size = UDim2.new(1,0,0.2,0)
end
task.wait(60)
end)
end