local driller = "sonic" //Your character goes here. addHook("AbilitySpecial", function(player) if (player.mo and player.mo.valid) //Does player exist? local mo = player.mo if (player.mo.skin == driller) player.charability = 0 //Remove the original ability if not (player.pflags & PF_THOKKED) //And player hasn't drilled yet... S_StartSound(player.mo, sfx_spndsh) //Play the spindash charging sound... P_SetObjectMomZ(player.mo, 20*FRACUNIT, false) //The "double jump" part of the script. //P_InstaThrust(player.mo, player.drawangle, player.speed*2/3) //For Blaze! ;) Use this if you want to halt your momentum!!! player.airdrilled = true //Has done this... player.pflags = $|PF_THOKKED //Has done this... (Yeah, another check. end end end end) //Remove this for the "original" function. addHook("PlayerThink", function(player) if (player.mo and player.mo.valid) local mo = player.mo if (player.mo.skin == driller) if player.mo.eflags & MFE_SPRUNG and not P_IsObjectOnGround(player.mo) and (player.airdrilled == true) if (player.cmd.buttons & BT_USE) P_StartQuake(10*FRACUNIT, 1*TICRATE*1/2) S_StopSoundByID(player.mo, sfx_spring) S_StartSound(player.mo, sfx_sprong) if (player.mo.state == S_PLAY_SPRING) P_SetObjectMomZ(player.mo, 30*FRACUNIT, false) //Beg hop. else P_InstaThrust(player.mo, player.drawangle, 60*FRACUNIT) end player.airdrilled = false //Nope. else player.airdrilled = false //Nope. end end end end end) //THIS. IS. A. MESS. IMPOSSIBLE. TO. EXPLAIN. (But I'll try anyway) addHook("PlayerThink", function(player) //Thinkin' if (player.mo and player.mo.valid) //If player exists local mo = player.mo //Mo now stands for the player(_t) if (player.mo.skin == driller) //And you are the driller. if P_IsObjectOnGround(player.mo) and (player.airdrilled == true) and (player.cmd.buttons & BT_USE) //You are on ground and you are airdrilling and you are pressing the spin button. for x=player.mo.x,player.mo.x+player.mo.radius,player.mo.radius //Too hard. for y=player.mo.y,player.mo.y+player.mo.radius,player.mo.radius //Impossible. local ss = R_PointInSubsector(x,y) //O_O for fof in ss.sector.ffloors() //Boop. if (fof.flags & FF_BUSTUP) and (fof.flags & FF_EXISTS) //Oop if (player.mo.z+player.mo.momz==fof.topheight or player.mo.z+player.mo.height+player.mo.momz==fof.bottomheight or (player.mo.eflags & MFE_VERTICALFLIP and (player.mo.z+player.mo.momz==fof.bottomheight or player.mo.z-player.mo.height-player.mo.momz==fof.topheight))) //Kaboop EV_CrumbleChain(ss.sector, fof) //Break the floor. end end end end end end end end end) addHook("PlayerThink", function(player) if (player.mo and player.mo.valid) //Does player exist? local mo = player.mo if (player.mo.skin == driller) and (player.airdrilled == true) if (P_PlayerInPain(player) or player.mo.state == S_PLAY_DEAD) return end if (player.powers[pw_carry] == CR_NONE) if P_IsObjectOnGround(player.mo) //Is player on ground? //P_InstaThrust(player.mo, player.drawangle, player.speed+10*FRACUNIT) //Remove the comment part if you want player to gain speed after touching the ground. P_SetObjectMomZ(player.mo, 5*FRACUNIT, false) //Smol hop. player.airdrilled = false //Nope. player.mo.state = S_PLAY_FALL //[*FALL STATE INTENSIFIES*] player.pflags = $1&~PF_SPINNING S_StartSound(player.mo, sfx_rocks1) P_StartQuake(10*FRACUNIT, 1*TICRATE*1/2) elseif not P_IsObjectOnGround(player.mo) //What if you aren't on ground? P_SpawnThokMobj(player) //Spawn the thok object... player.mo.state = S_PLAY_ROLL //Make sure you're rollin' X3 player.pflags = $|PF_SPINNING //Make sure you're rollin' X4 if not (P_IsObjectInGoop(player.mo)) if not (player.cmd.buttons & BT_USE) P_SetObjectMomZ(player.mo, -1*FRACUNIT*1/3, true) elseif (player.cmd.buttons & BT_USE) P_SetObjectMomZ(player.mo, -4*FRACUNIT, true) end end end end end end end) addHook("PlayerThink", function(player) if (player.mo and player.mo.valid) //Does player exist? local mo = player.mo if (player.mo.skin == driller) and (player.airdrilled == true) if (P_PlayerInPain(player) or player.mo.state == S_PLAY_DEAD) player.airdrilled = false //Nope. end end end end)