If someone says "/e sprinkler" or "/e cabbage", the script checks if they're in a certain group, if they are then they would perform the follow animations. If they aren't then nothing happens.
YourGroupId = "846314"
function onPlayerEntered(newPlayer)
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg == '/e sprinkler' and newPlayer:IsInGroup(YourGroupId) then
player.animationID = 149359445
if msg == '/e cabbage' and newPlayer:IsInGroup(YourGroupId) then
player.animationID = 168149515
Thanks

2 comments
To me, it appears you forgot the 'end''s for the 'if' statements and functions, ya Silly Billy. :)
Adding end doesn't seem to affect the script. Thanks for pointing out anyway!