View difference between Paste ID: Q9Z6xWw0 and FFnNZTmg
SHOW: | | - or go back to the newest paste.
1
local mt = {}
2
function mt.__newindex(t, key, value)
3-
    if key == 'x' or key == 'y' then
3+
    if key == 'X' or key == 'Y' then
4
        local lkey = key:lower()
5-
            if not t[i]['_' .. key] then
5+
6-
                t[i]['_' .. key] = t[i][key]
6+
            if not t[i][key] then
7
                t[i][key] = t[i][lkey]
8-
            t[i][key] = t[i]['_' .. key] + value
8+
9
            t[i][lkey] = t[i][key] + value
10
        end
11
    end
12
    t[key] = value
13-
frontgroup.x = nil
13+
14-
frontgroup.y = nil
14+