Script question

Avatar

By soulplexis 25 February 2019 18:39

Donator · 166 comments

How do you make the player do some things, such as...
How do you make the player use the item in hand? (Eat/block)
How do you make the player do something upon swinging your arm? (example if player swings, jump)
How do you detect if the player is damaged, damages an entity, etc.? and then perform an action ? for example, to make a criticals hack, or to make a autoleave hack or something (i know these are already existing but im experimenting shh)


ソルプレクサス

Avatar

By Shiv3R 25 February 2019 19:00

Member · 107 comments

Damage:
if (mc.thePlayer.hurtTime > 0)

Use item:
if (mc.thePlayer.isUsingItem())

It dont work if player swings it jump, it just swing when jump

mc.thePlayer.swingArm

Avatar

By icewormy3 25 February 2019 19:10

Member · 267 comments

also, you can use mc.thePlayer.swingItem