Help with small script

How i can replace


if code:GetValue() == "AUTTTISM" then

(That not working)


concommand.Add("promocode", function()
    
local main = vgui.Create("DFrame") 
main:SetSize(300, 90) 
main:MakePopup() 
main:Center()
main.Paint = function()
            Derma_DrawBackgroundBlur(main, main.startTime)
            draw.RoundedBox(0, 5, 5, 500, 385, Color(0, 0, 0, 200))
        end
 
local code = vgui.Create("DTextEntry",main)
code:SetSize(280,20)
code:SetPos(10,60)
code:SetMultiline(false) 
 code.OnEnter = function() 
       if code:GetValue() == "AUTTTISM" then
          timer.Create("code", 999999, 1, function()  -- simple use
          LocalPlayer():PS2_AddStandardPoints(200)  
          end)
       end
    end
end)

Thanks in advance

The code works fine, you are just using http://wiki.garrysmod.com/page/timer/Create wrong. You have it set to a delay of 999999.

Thanks, but now some troubles with pointshop


attempt to call method 'PS2_AddStandardPoints' (a nil value)

You are using a server-side function on the client, that won’t work. Check this thread out, OP had the some problem you had: http://forum.facepunch.com/showthread.php?t=1542267

:snip: ^ same message posted at same time.

Oh ty guys <3