Need help with setting player models based off of ULX groups

What LUA script will check if a player is an admin and set there player model to one specified? The server is a TTT server.

[lua]if ply:IsUserGroup(“donator”) then
ply:SetModel(“models/alyx.mdl”)
end[/lua]

or you can use ply:IsAdmin() etc.

Hopefully this isn’t too much of a bump, but I want to do something for one of my superadmins.

Where would this go?

[lua]hook.Add(“Think”,“setPlyModels”,function()
for _,ply in pairs(player.GetAll()) do
if ply:IsUserGroup(“Admin”) then
ply:SetModel(“models/player/mossman.mdl”)
end
end
end)[/lua]

typed on a phone. tell me if this works…

Okay sorry I’m really bad with lua I just made a few custom weapons for my TTT Server, and I think I understand what the code there does, but what file does that go in? o: like, any gamemode lua file or… i really have no idea o:

edit : thanks for trying to help me