allowed = {"IncaderZim", "otherplayerhere", "ormaybeevenanotherplayer", "trululu"}
function chat(msg)
if (msg == "command here") then
local brick = workspace["BrickNameHere"]
for i = 1, 50 do --[[ change 50 to the amount of studs it should increase in size ]]
brick.Size = brick.Size * Vector3.new(1, 0, 0) --[[ if it goes the wrong way, put the 1 in the end of the Vector3 value, so (0, 0, 1) ]]
wait()
end
if (msg == "other command here") then
-- this will decrease the size again
local brick = workspace["BrickNameHere"]
for i = 1, 50 do
brick.Size = brick.Size * Vector3.new(-1, 0, 0)
wait()
end
end
end
function checkIfPlrIsAllowed(obj) -- check if the speaker is in the allowed list
for i = 1, #allowed do
if (allowed[i] == obj.Name) then
return true
end
end
return false
end
game.Players.PlayerAdded:connect(function(plr)
local c = checkIfPlrIsAllowed(plr)
if (c == true) then
plr.Chatted:connect(function(msg)
chat(msg)
end)
end
end)
-- This will probably work.
-- Woot, I just helped a 2007'er :D |