local imagepower = 1 local powerupsonly = 0 COM_AddCommand("imagepower", function(player, yesno) if yesno == "1" then imagepower = 1 elseif yesno == "2" imagepower = 2 else CONS_Printf(player, "You're supposed to to type 1/2. Currently set to "..tostring(imagepower)) end end, 1) COM_AddCommand("powerupsonly", function(player, yesno) if yesno == "1" then powerupsonly = 1 elseif yesno == "0" powerupsonly = 0 else CONS_Printf(player, "This sets if power ups only is on or not. Currently set to "..tostring(powerupsonly)) end end, 1) addHook("PlayerThink", function(player) if powerupsonly == 0 if player.mo ~= nil then if imagepower == 2 P_SpawnGhostMobj(player.mo) end if imagepower == 1 A_GhostMe(player.mo,6,6) end end end if powerupsonly == 1 if player.speed >= 70*FRACUNIT or player.powers[pw_super] > 0 or player.powers[pw_sneakers] > 0 or player.dashmode > 2*TICRATE if imagepower == 2 P_SpawnGhostMobj(player.mo) end if imagepower == 1 A_GhostMe(player.mo,6,6) end end end end)