Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[]
- #########################################
- ✸Created By - Ctmce✸
- ✸Modified (Acid version) by Trexexjc#0000✸✸
- ✸Module version: v1.1✸
- ✸Updated date: 24/01/2021✸
- #########################################
- Commands list:
- !ms [MSG] = Send a message as a funcorp member.
- !start = starts the game!
- !stop = stops the game!
- !g = will switch the ground(if current ground is acid , then it will switch it to dirt same with dirt to acid)!
- !tp all = turn on the tp power(See Other powers list to know how to use it)!
- !kill [Username] = Kills the player, useful for people that glitch out or bug
- !snow = Toggles on snow for a minute
- !wind [Wind] = Changes wind to desired parameters. Example !wind 10. Default is 0
- !gravity [Gravity] = Changes gravity to desired value. Default is 10
- NOTE: Gravity and wind changes only apply per round.
- !climate default = Changes wind and gravity back to default
- !cheese [Username] = Gives cheese to desired player
- !respawn [Username] = Respawns desired player
- !vampire [Username] = Converts desired player into a vampire
- !joke = Surprise!
- !help = Explains how the minigame works!
- Other powers:
- 1. If tp power is on , then Mouse click anywhere in the map to teleport everyone aswell as you to the mouse position!
- 2. Hold Shift+Mouse click = spawn random objects in your mouse position!
- ]]
- game = {
- admins = { ["Noooooooorr#0000"] = true , ["Kiwi_is_here#0558"] = true},
- time = 60,
- started = false,
- currentGround = "dirt",
- dirtTimer = nil,
- acidTimer = nil,
- dirtCD = 3000,
- acidCD = 10000,
- tArea = 10,
- objects = {1,109,119,124,219,217,226,228,313,316,323,325,422,424,411,409,622,615,610,620,701,702,701,702,1006,1009,1010,1007,39,39,59,59,60,60,60,60,62,62,68,68,68,68,23,23,90,90,40,40,40,40,40,40,57,57,61,61,61,69,69,46,46,45,45,45,45,45,54,1716,1719,1715,1723,89,89,2825,2823,2829,2827},
- maps = {"7819891","7819896"},
- objectsList = {},
- ground = {},
- lmao = {"مساء العنبر ممكن النمبر","مساء الفرفشة ممكن دردشة","أنت نوب هههه","البطاطا لذيذة! حقيقة لا يمكن إنكارها"},
- backgrounds = {"173cf0990b3.png","173cf03fa86.png","173cf0392da.png","17372d45dca.jpg","17372d3d135.png","1736d136ca9.png","1736d34a204.png","17369683742.jpg","173695d6d70.jpg","17369524d79.jpg","17369524d79.jpg","1736951e776.jpg","17305a13915.png","172fd0940c4.png","172fd0847d7.png","1712c2e573f.png","1711ecc824b.jpg","1711e9a5172.jpg","1711e9a072a.jpg","1711e8ce5f7.jpg","1711e8ca452.jpg","1711e8c0569.jpg","165245b5238.jpg","1700112d165.jpg","17001097f5a.jpg","170013d6683.jpg"}
- };
- players = {}
- local looper = 0
- local reapet = truelocal
- local wind=0
- local gravity=10
- tpAll = false
- local sObjects = false
- game.ground.acid = {type = 19,x = 800,y = 387,r = 0.2,f = 0.3,w = 1600,h = 37,gc = true,mc = true}
- game.ground.dirt = {type = 17,x = 800,y = 387,r = 0.2,f = 0.3,w = 1600,h = 37,gc = true,mc = true}
- function main()
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoScore(true)
- system.disableChatCommandDisplay(nil,true)
- tfm.exec.disablePhysicalConsumables(true)
- tfm.exec.setRoomMaxPlayers(200)
- tfm.exec.disableMinimalistMode(true)
- changeMap()
- table.foreach(
- tfm.get.room.playerList,
- function(name)
- eventNewPlayer(name)
- end
- )
- end
- function changeMap()
- tfm.exec.newGame(game.maps[math.random(1,#game.maps)])
- ui.setMapName("<font color='#02FD00'>حمض مميت</font><font color='#009d9d'> لقد تحولت الأرض إلى</font>")
- end
- local setScore = function(name) tfm.exec.setPlayerScore(name, players[name].score, false) end
- local refreshTimers = function(ground) if ground == "dirt" then game.dirtTimer = 3 elseif ground == "acid" then game.acidTimer = 10 else game.acidTimer = 10 game.dirtTimer = 3 end end
- function removeObjects()
- for _,i in next,game.objectsList
- do
- tfm.exec.removeObject(i)
- end
- game.objectsList = {}
- end
- local resetProp = function() game.time = 60 game.tArea = 10 game.objectsList = {} game.currentGround = "dirt" refreshTimers() end
- local removeAreas = function() for _,area in next,{1,2,10} do ui.removeTextArea(area,nil) end end
- function alivePlrCount()
- local c = 0
- for n,p in pairs(tfm.get.room.playerList) do
- if not p.isDead then
- c = c + 1
- end
- end
- return c
- end
- local isAdmin = function(name) if game.admins[name] then return true else return false end end
- function spawnObjects(x,y)
- if game.started == true then
- local oC = math.ceil((game.time / 10 > 1 and game.time / 10 or 1))
- local g = false
- local a = nil
- if o == 62 then
- a = 90 g = true
- end
- if x ~= nil and y ~= nil then
- local o = game.objects[math.random(1,#game.objects)]
- if o == 62 then
- a = 90
- g = true
- else
- a = nil
- g = nil
- end
- local sO = tfm.exec.addShamanObject(o, x, y, (a and a or 0),0,0, (g or false)) table.insert(game.objectsList,sO)
- else
- for i=1,oC,1 do
- local o = game.objects[math.random(1,#game.objects)]
- if o == 62 then
- a = 90
- g = true
- else
- a = nil
- g = nil
- end
- local sO = tfm.exec.addShamanObject(o, math.random(100,1500), 360, (a and a or 0),0,0, (g or false)) table.insert(game.objectsList,sO)
- end
- end
- end
- end
- function groundSwitch()
- if game.started == true then
- if game.currentGround == "dirt" then
- local gP = game.ground.acid
- tfm.exec.addPhysicObject(1, gP.x, gP.y, {type = gP.type,width = gP.w,height = gP.h,foreground = false,friction = gP.f, restitution = gP.r, angle = 0, miceCollision = gP.mc, groundCollision = gP.gc})
- ui.addTextArea(1, "<p align='center'><font size='30' color='#00FF21'>لقد تحولت الأرض إلى حمض مميت</font></p>", nil, 140, 125, 520, 119, 0x324650, 0x000000, 0, true)
- refreshTimers(game.currentGround)
- game.currentGround = "acid"
- elseif game.currentGround == "acid" then
- local gP = game.ground.dirt
- for _,id in next,game.objectsList do
- tfm.exec.removeObject(id)
- end
- tfm.exec.addPhysicObject(1, gP.x, gP.y, {type = gP.type,width = gP.w,height = gP.h,foreground = false,friction = gP.f, restitution = gP.r, angle = 0, miceCollision = gP.mc, groundCollision = gP.gc})
- refreshTimers(game.currentGround) game.currentGround = "dirt"
- end
- end
- end
- function decToHex(color)
- local b,k,out,i,d=16,"0123456789ABCDEF","",0
- while color>0 do
- i=i+1 color,d=math.floor(color/b),color%b+1 out=string.sub(k,d,d)..out
- end
- return out
- end
- function admins_msg(msg)
- for admin in next, game.admins do
- tfm.exec.chatMessage(msg, admin)
- end
- end
- function eventColorPicked(id, name, color)
- if color>0 then
- if id==0 then
- tfm.exec.chatMessage("<CE> سيتم تلبية طلبك بتغيير لون اسمك : <font color='#"..decToHex(color).."'># ", name)
- admins_msg("<VP>/colornick "..name.." </VP><font color='#"..decToHex(color).."'>#"..decToHex(color).."</font>")
- end
- else
- tfm.exec.chatMessage("<R>.لا يمكن إختيار هذا اللون [•]", name)
- end
- end
- function giveWin(name)
- tfm.exec.setVampirePlayer(name, false)
- tfm.exec.giveCheese(name)
- tfm.exec.playerVictory(name)
- players[name].score = players[name].score + 1
- setScore(name)
- if players[name].score == 1 then
- tfm.exec.chatMessage(
- "<ROSE>ما هو اللون الذي تريده لاسمك؟، !" ..name.." أحسنت عملًا يا •</ROSE>"
- )
- ui.showColorPicker(0, name, 0xFFFFFF,"جائزة تغيير لون الاسم")
- elseif players[name].score == 2 then
- tfm.exec.chatMessage(
- "<ROSE>!" ..name.." أحسنت عملًا يا ،سيتم تكبير فأرك •</ROSE>"
- )
- tfm.exec.changePlayerSize(name, 2)
- elseif players[name].score == 3 then
- tfm.exec.chatMessage(
- "<ROSE>!لقد فزت ثلاثة مرات ، سيتم تكبير فأرك أكثر في الجولة الثانية " ..name.." مدهش يا •</ROSE>"
- )
- tfm.exec.changePlayerSize(name, 3)
- elseif players[name].score == 4 then
- tfm.exec.chatMessage(
- "<ROSE>!بأربعة جولات! مبارك! سوف تكبر أكثر و أكثر " ..name.." لقد فاز •</ROSE>"
- )
- tfm.exec.changePlayerSize(name, 4)
- elseif players[name].score == 5 then
- tfm.exec.chatMessage(
- "<ROSE>!سيحصل فأرك على أكبر حجم " ..name.." خمسة مرات، بجد؟ مبارك يا •</ROSE>"
- )
- tfm.exec.changePlayerSize(name, 5)
- elseif players[name].score == 6 then
- tfm.exec.chatMessage(
- "<ROSE>وصلت بالفعل إلى الحجم الأقصى!هل تريد الحصول على اسم مختلف؟ " ..name.." •</ROSE>"
- )
- else
- tfm.exec.chatMessage(
- "<font color='#F89F4B'>[Funcorp]</font> <font color='#C2C2DA'>!أحسنت عملًا،" ..name.." مذهل يا</font>"
- )
- end
- end
- function setGround(g)
- if game.started == false then
- game.currentGround = g
- local gP = game.ground[g]
- tfm.exec.addPhysicObject(1, gP.x, gP.y, {type = gP.type,width = gP.w,height = gP.h,foreground = false,friction = gP.f, restitution = gP.r, angle = 0, miceCollision = gP.mc, groundCollision = gP.gc})
- else
- game.currentGround = g
- local gP = game.ground[g]
- tfm.exec.addPhysicObject(1, gP.x, gP.y, {type = gP.type,width = gP.w,height = gP.h,foreground = false,friction = gP.f, restitution = gP.r, angle = 0, miceCollision = gP.mc, groundCollision = gP.gc})
- refreshTimers(game.currentGround)
- end
- end
- function eventNewGame()
- Background = game.backgrounds[math.random(#game.backgrounds)]
- tfm.exec.addImage(Background, "_0", 0, 0)
- if game.started == true then
- resetProp()
- system.removeTimer(meep)
- system.removeTimer(cheese)
- meep = nil
- cheese = nil
- reapet = true
- tfm.exec.setGameTime(game.time, true)
- setGround("dirt")
- meep = system.newTimer(function() table.foreach(tfm.get.room.playerList,function(name)
- tfm.exec.giveMeep(name)
- end) end,35000,false)
- cheese = system.newTimer(function() table.foreach(tfm.get.room.playerList,function(name) tfm.exec.giveCheese(name) end) end,65000,false)
- else
- resetProp()
- setGround("dirt")
- end
- end
- function eventNewPlayer(name)
- if players[name] then
- players[name].score = 0
- setScore(name)
- else
- players[name] = {score = 0}
- setScore(name)
- end
- if Background then
- tfm.exec.addImage(Background, "_0", 0, 0, name)
- end
- tfm.exec.chatMessage(
- "<font color='#ff8547'>مرحبًا بك في الفانكورب!- لقد تحولت الأرض إلى حمض مميت</font><br><br>" ..
- "<font color='#D9BF1C'>Module made by Osicat#0000, remade by Ctmce#0000, edited by Trexexjc#0000. Special thanks to Ork#0015 for the maps! <3<br>" ..
- "<font color='#30ba76'><br>" ..
- "<font color='#30ba76'>!الفائز بجولة يمكن أن يحصل على لون لاسمه من اختياره<br>!و إذا فزت أكتر من مرتيين فسوف يكبر حجم فأرك<br>" ..
- "<font color='#30ba76'>.تقوم باستعمال الثغرات . سيتم طرد كل من يستعمل الثغرات <b>لا</b> •<br>" ..
- ".تقوم بتكرار الكلام المزعج ، أو سوف يتم طردك من الغرفة <b>لا</b> •</font><br><br><font color='#ff8547'>", name
- )
- if isAdmin(name) then
- system.bindMouse(name, true)
- system.bindKeyboard(name, 16, false, true)
- system.bindKeyboard(name, 16, true, true)
- end
- end
- function eventPlayerDied(name)
- if game.started == true then
- if alivePlrCount() <= 1 then
- reapet = false removeAreas()
- for name,p in next,tfm.get.room.playerList do
- if not p.isDead then
- ui.addTextArea(2, "<p align='center'><font size='30' color='#FFFF00'>!فاز بالجولة "..name.."</font></p>", nil, 50, 250, 700, 500, 0x324650, 0x000000, 0, true)
- tfm.exec.chatMessage("<font color='#EAE633'>!فاز بالجولة " ..name.."", player)
- ui.addTextArea(1, "<p align='center'><font size='30' color='00FF21'>لقد تحولت الأرض إلى حمض مميت</font></p>", nil, 50, 125, 700, 119, 0x324650, 0x000000, 0, true)
- giveWin(name)
- end
- end
- system.newTimer(function() removeAreas() changeMap() end, 5000, false)
- end
- end
- end
- function eventChatCommand(name, command)
- local arg={}
- for argument in command:gmatch('[^%s]+') do
- table.insert(arg,argument)
- end
- if isAdmin(name) == true then
- if arg[1] == "ms" and arg[2] ~= nil then
- local t = command:find('%s')
- local msg = command:sub(t+1)
- tfm.exec.chatMessage("<font color='#F95705'>• [" ..name .."]:</font><font color='#FF8547'> " ..msg .."</font>")
- end
- if arg[1] == "tp" and arg[2] == "all" then
- tfm.exec.chatMessage("<font color='#F95705'>• [FuncorpBot]:</font><bv> You turned ON tp power! <b>Mouse click</b> anywhere on the screen to teleport everyone!</bv>",name)
- tpAll = true
- end
- if arg[1] == "start" then
- if not game.started then
- game.started = true
- changeMap()
- end
- elseif arg[1] == "stop" then
- if game.started == true then
- game.started = false
- removeAreas()
- changeMap()
- end
- elseif arg[1] == "g" then
- removeAreas()
- spawnObjects()
- groundSwitch()
- elseif arg[1] == "kill" then
- tfm.exec.killPlayer(arg[2])
- elseif arg[1] == "snow" then
- tfm.exec.snow(60, 10)
- tfm.exec.chatMessage(
- "<font color='#C2C2DA'>!أنظر! إنها تُثلج</font> <font color='#F89F4B'>[الفانكورب]</font>"
- )
- elseif arg[1] == "climate" and arg[2] == "default" then
- wind = 0
- gravity = 10
- tfm.exec.setWorldGravity(wind,gravity)
- tfm.exec.chatMessage(
- "<font color='#C2C2DA'>!نحن بأمان ، ولت تغيرات الرياح والجاذبية</font> <font color='#F89F4B'>[الفانكورب]</font>"
- )
- elseif arg[1] == "wind" then
- wind = arg[2]
- tfm.exec.setWorldGravity(wind,gravity)
- tfm.exec.chatMessage(
- "<font color='#C2C2DA'>!يبدو أن هناك بعض التغييرات على الريح</font> <font color='#F89F4B'>[الفانكورب]</font>"
- )
- elseif arg[1] == "gravity" then
- gravity = arg[2]
- tfm.exec.setWorldGravity(wind,gravity)
- tfm.exec.chatMessage(
- "<font color='#C2C2DA'>!يبدو أن هناك بعض التغييرات في الجاذبية</font> <font color='#F89F4B'>[الفانكورب]</font>"
- )
- elseif arg[1] == "cheese" then
- tfm.exec.giveCheese(arg[2])
- elseif arg[1] == "respawn" then
- tfm.exec.respawnPlayer(arg[2])
- elseif arg[1] == "vampire" then
- tfm.exec.setVampirePlayer(arg[2], true)
- elseif arg[1] == "joke" then
- local theJoke = game.lmao[math.random(#game.lmao)]
- tfm.exec.chatMessage(
- "<font color='#C2C2DA'>سنقوم بعمل مزحة خفيفة !! الرجاء من الجميع كتابة</font> <font color='#F89F4B'>[الفانكورب]</font>\n <font color='#ffffff'> /c "..arg[2].." "..theJoke.." </font>"
- )
- elseif arg[1] == "help" then
- tfm.exec.chatMessage(
- "<font color='#F89F4B'>[Funcorp]</font> <font color='#F89F4B'>في المرة الأولى التي تفوز فيها ، ستحصل على تغيير في اسم اللون ، إذا فزت مرة أخرى ستصبح كبيرًا ، وستستمر في النمو من هناك! اتمنى ان تستمتع! <3</font>"
- )
- end
- end
- end
- function eventKeyboard(name, key, Keydown, x, y)
- if isAdmin(name) then
- if key == 16 then
- if Keydown then
- sObjects = true
- else
- sObjects = false
- end
- end
- end
- end
- function
- eventMouse(name, x, y)
- if isAdmin(name) then
- if sObjects == true then
- spawnObjects(x,y)
- end
- if tpAll == true then
- for n,p in pairs(tfm.get.room.playerList) do
- tfm.exec.movePlayer(n,x,y,false,0,0,false)
- end
- tpAll = false
- end
- end
- end
- function eventLoop(cT, tR)
- if game.started == true and reapet == true then
- tR = tR / 1000
- game.time = tR
- looper = looper + 0.5
- if looper == 1 then
- if game.currentGround == "acid" then
- if game.dirtTimer > 0 then
- game.dirtTimer = game.dirtTimer - 1 elseif
- game.dirtTimer <= 0 then
- groundSwitch()
- ui.removeTextArea(1, nil)
- end
- end
- if game.currentGround == "dirt" then
- if game.acidTimer > 0 then
- if game.acidTimer == 4 then
- spawnObjects()
- end
- ui.addTextArea(10, "<p align='center'><font size='90'>" ..game.acidTimer .."</font></p>", nil, 340, 125, 120, 119, 0x324650, 0x000000, 0, true)
- game.acidTimer = game.acidTimer - 1
- elseif
- game.acidTimer <= 0 then
- ui.removeTextArea(10,nil)groundSwitch()
- end
- end
- looper = 0
- end
- end
- end
- main()
Add Comment
Please, Sign In to add comment