Need help with LUA script

Like in title.
I wanna make this pernamently and place it in pointshop. Can someone help me?

local EVENT = {}

EVENT.Name = “Money”
EVENT.Price = 2400
EVENT.Icon = “upgrade_icons/money.png”
EVENT.Description = “Start the round with an extra credit.”

if SERVER then
EVENT.Hooks = { “TTTBeginRound” }

function EVENT:TTTBeginRound()
	for k,v in pairs(player.GetHumans()) do
		if v:IsActiveSpecial() and v:UpgradeEnabled("money") then
			v:AddCredits(1)
		end
	end
end

end

TTT_AddUpgrade(“money”, EVENT)


(User was banned for this post ("Missed the rules sticky, wrong section" - postal))

wrong section

There’s a mega thread for this kind of thing under the Garry’s mod section

Are you sure about TTT_AddUpgrade and UpgradeEnabled?
I would personally move the script to a different lua file, use an Dummy PS Item and use PS_HasItemEquipped instead.
(untested)
something like this:


function MoneyCreditsPS()
local PlayerTable = player.GetAll()
	for k,v in pairs(PlayerTable) do
		if v:IsActiveSpecial() and v:PS_HasItemEquipped('money') then
			v:AddCredits(1)
		end
	end
end
 
hook.Add("TTTBeginRound", "MoneyCreditsPS", MoneyCreditsPS)

edit://
Also this is a Section for Releases, not for Question about the Pointshop. http://facepunch.com/forums/16 would be more fittin.
And the [ code ] tag, (# in the WYSIWYG) helps a lot to read your Lua Script :slight_smile:

Thank you so much