Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local coinmat = Material("fabycoin/coin.png")
- local lastcoins = 0
- local coinanim = false
- local coinanimi = 0
- local coinanimdiff = 0
- local CoinTextX = 25
- local CoinTextY = 13
- local CoinTextSize = 12
- local CoinPicX = 5
- local CoinPicY = 5
- local CoinPicWidth = 16
- local CoinPicHeight = 16
- surface.CreateFont("CoinFont", {font = "bebas", size = CoinTextSize, weight = 0})
- hook.Add("HUDPaint", "FabyCoin", function()
- surface.SetMaterial( coinmat )
- surface.SetDrawColor( Color(255, 255, 255, 255 ) )
- surface.DrawTexturedRect(CoinPicX ,CoinPicY ,CoinPicWidth ,CoinPicHeight )
- if lastcoins != LocalPlayer():PS_GetPoints() then
- coinanim = true
- coinanimi = 0
- coinanimdiff = LocalPlayer():PS_GetPoints() - lastcoins
- end
- if coinanim then
- cointext = math.floor( ( LocalPlayer():PS_GetPoints() - coinanimdiff ) + ( coinanimdiff * ( coinanimi / 100 ) ) )
- coinanimi = coinanimi + 10
- else
- cointext = LocalPlayer():PS_GetPoints()
- end
- cointext = string.reverse(cointext):gsub('(%d%d%d)','%1,'):reverse()
- if string.sub(cointext,1,1) == "," then
- cointext = string.sub(cointext,2, string.len(cointext) )
- end
- draw.SimpleTextOutlined( cointext , "CoinFont", CoinTextX , CoinTextY , Color(255, 255, 255), 0, 1, 1, Color(0, 0, 0) )
- if coinanimi >= 100 then
- coinanim = false
- end
- lastcoins = LocalPlayer():PS_GetPoints()
- end)
Advertisement
Add Comment
Please, Sign In to add comment