Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------- A VERY OLD SCRIPT THAT I SIMPLY *added* THE NEW FEATURE IN --------------
- Players = {}
- admins = {"Abdeltif", "Perttymice", "YourNameHere"}
- ui.addTextArea(0, "", nil, 50,50,nil,nil, 0x0055FF, 0x0022FF, 0.65, true)
- function eventNewPlayer(name)
- tfm.exec.bindKeyboard(name, 32, false, true)
- Players[name] = {}
- Players[name].part = 0
- Players[name].admin = off
- end
- for k,v in pairs(tfm.get.room.playerList) do
- eventNewPlayer(k)
- end
- for k,v in pairs(admins) do
- eventNewPlayer(v)
- Players[v].admin = true
- end
- function eventChatCommand(name, cmd) --COMMANDS AREA
- local cmds = {}
- for arg in cmd:gmatch("[^%s]+") do
- table.insert(cmds, arg)
- end
- if cmds[1] == "say" then
- local str = "Those are the following :\n"
- for k,v in pairs(cmds) do
- str = str..v.."\n"
- end
- ui.updateTextArea(0, str, nil)
- elseif cmds[1] == "meep" then
- if cmds[2] == nil then nole = name else nole = cmds[2] end
- tfm.exec.giveMeep(nole)
- elseif cmds[1] == "vamp" then
- if name ~= "Abdeltif" then return end
- if cmds[2] == nil then nole = name else nole = cmds[2] end
- tfm.exec.setVampirePlayer(nole)
- elseif cmds[1] == "part" then
- local newed = tonumber(cmds[2])
- if newed == nil or type(newed)~="number" or newed>37 or newed<0 then
- ui.addPopup(1, 0, "You need to insert a particle between 0 and 37 (!part [0to37])", name, 50, 50, nil, true)
- return
- end
- Players[name].part = cmds[2]
- elseif cmds[1] == "tp" then
- print(cmds[2])
- if Players[name].admin == false then
- ui.addPopup(1, 0, "You are not an admin !", name, 50, 100, nil, true)
- return
- elseif (not cmds[2] == "on") or (not cmds[2] == "off") or (not cmds[2]) then
- ui.addPopup(1, 0, "use !tp ON or !tp OFF to switch the click-teleportation skill", name, 50, 100, nil, true)
- return
- end
- if string.lower(cmds[2]) == "on" then
- system.bindMouse(name, true)
- Players[name].tp = true
- elseif string.lower(cmds[2]) == "off" then
- Players[name].tp = false
- end
- elseif cmds[1] == "colour" or cmds[1] == "color" then
- ui.showColorPicker(1, name, 0xF581A1, "Choose your best Name color!")
- end
- end
- function eventColorPicked( id, name, color)
- local b = id == 1 and tfm.exec.setNameColor(name, color)
- end
- function project(x,y,part,xs) -- Used for particles
- for i=0,30,10 do
- tfm.exec.displayParticle(part, x, y+i, xs, 0,0,0,nil)
- end
- end
- function eventKeyboard(name, key, down, x, y) -- For keyboard
- if key == 32 then
- if tfm.get.room.playerList[name].isFacingRight then
- project(x,y,Players[name].part, 3)
- else
- project(x,y,Players[name].part, -3)
- end
- end
- end
- function eventMouse(name, x, y)
- if Players[name].tp then
- tfm.exec.movePlayer(name, x, y)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment