Point Finder - script I made

Okay, I made a handy script to show how many points you have in-game with a Hint.

(I know the code is very messy. I did this in a few minutes.)

-- Point Finder
-- Tells how many points you have in game with a handy hint!

local AwardablePoints = game:GetService("PointsService"):GetAwardablePoints()
local hint = Instance.new("Hint",Workspace)
hint.Name = "Points" -- this is not a virus. this is just a name I am giving this hint for the auto refresher.
hint.Text = "Points available to be awarded/given: "..AwardablePoints

local waittime = 60 -- 60 seconds by default to prevent Hint spam.

function Refresh()
	wait(waittime)
	Workspace:findFirstChild("Points").Text = "Refreshing points..."
	wait(2)
	Workspace:findFirstChild("Points").Text = "Points available to be awarded/given: "..AwardablePoints
end

while true do
	Refresh()
end

I might be late, but I hope you like. :slight_smile:

It doesn’t actually refresh, Lua doesn’t have fancy pointers like that

I think something like this is what you’re going for:

local PointsService = Game:GetService("PointsService")

local hint = Instance.new("Hint", Workspace)
hint.Name = "PointsHint"

while true do
	hint.Text = "Points available to be awarded/given: " .. PointsService:GetAwardablePoints()
	wait(15)
end

[quote] It doesn’t actually refresh, Lua doesn’t have fancy pointers like that

I think something like this is what you’re going for:

[code]
local PointsService = Game:GetService(“PointsService”)

local hint = Instance.new(“Hint”, Workspace)
hint.Name = “PointsHint”

while true do
hint.Text = "Points available to be awarded/given: " … PointsService:GetAwardablePoints()
wait(15)
end
[/code] [/quote]

Ah, thank you!

It doesn’t have fancy pointers, but metatables are fancy.

[code]do
local oldenv=getfenv(0)
setfenv(
0,
setmetatable({},{
__index=function(_,i)
if i==“AwardablePoints” then
return oldenv.game:GetService(“PointsService”):GetAwardablePoints()
end
return oldenv[i]
end
})
)
end

print(AwardablePoints)[/code]