//local costo1

local function COSTOM1(player)
if player.mo.skin == "metalsonic" and player.playerstate == PST_LIVE then
if (player.cmd.buttons & BT_CUSTOM1) and player.control then
if (player.custom1tic == 1) then
//if player.rings > 5
P_InstaThrust(player.mo, player.drawangle, player.speed+20*FRACUNIT)
player.pflags = $ & ~PF_JUMPED
player.mo.state = S_PLAY_DASH
player.dashmode = 4*TICRATE
player.speed = player.speed+100*FRACUNIT
P_SpawnGhostMobj(player.mo)
S_StartSound(player.mo, sfx_mswarp)
//player.rings = $ - 5
//end
//costo1 = 0
end
end
if not(player.cmd.buttons & BT_CUSTOM1) then
//costo1 = 1
end
end
end
addHook("PlayerThink", COSTOM1)