2021-04-18 00:40:37 +00:00
|
|
|
print("Hello wtf!")
|
2021-04-16 02:30:18 +00:00
|
|
|
|
2021-04-18 00:40:37 +00:00
|
|
|
function onJoin(plr)
|
2021-04-16 02:30:18 +00:00
|
|
|
print(plr.type .. " " .. plr.name .. " joined from LUA!!")
|
2021-04-17 07:55:11 +00:00
|
|
|
plr.onChat:listen(function(msg)
|
2021-04-18 00:40:37 +00:00
|
|
|
print(plr.name .. " said : \'" .. msg .. "\'")
|
2021-04-17 07:55:11 +00:00
|
|
|
|
|
|
|
if msg == "kickme" then
|
|
|
|
plr:kick()
|
2021-04-18 00:40:37 +00:00
|
|
|
elseif msg == "hi" then
|
|
|
|
print("hello " .. plr.name)
|
2021-05-04 07:01:33 +00:00
|
|
|
elseif msg == "pet" then
|
|
|
|
local dog = NPC.new(plr.x, plr.y, plr.z, 3054)
|
|
|
|
while wait(2) and plr:exists() do
|
|
|
|
dog:moveTo(plr.x + math.random(-500, 500), plr.y + math.random(-500, 500), plr.z)
|
|
|
|
end
|
2021-04-17 07:55:11 +00:00
|
|
|
end
|
|
|
|
end)
|
2021-04-18 00:40:37 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
World.onPlayerAdded:listen(onJoin)
|
|
|
|
|
|
|
|
for i, plr in ipairs(World.players) do
|
|
|
|
onJoin(plr)
|
|
|
|
end
|
2021-04-16 02:30:18 +00:00
|
|
|
|
2021-04-10 23:41:55 +00:00
|
|
|
wait(2)
|
2021-04-16 02:30:18 +00:00
|
|
|
print("Hello world ~2 seconds later! running protcol version " .. World.version)
|