Jump to content

Cool skript Idea


jeep2729

Recommended Posts

Hey, its me again. I was wondering if there was any skript code that allows you to zoom in with the spyglass zoom

Idea: when player is shifting and holding right click and If player has a lead on there head (monocle) then It will zoom in with spyglass zoom

I dont have a skript currently because idk where to start so please tell me if my idea is possible

Link to comment
Share on other sites

I'm not sure if this is a clientside animation for the zooming. It may be the case that the client determines when it zooms in, similar to how bows show a custom animation when you pull them. It's possible though for you to still create a zoom effect by applying slowness to the player.

 

Here's my best alternative for the moment:

 

options:
 monocle: lead named "§eMonocle"
 slowness: 4

on sneak toggle:
 player is not sneaking
 player's helmet is {@monocle}
 metadata "monocle" of player is not set
 set {_c} to true
 set metadata "monocle" of player to true
 while player is online:
  {_c} is false:
   remove slowness from player
   delete metadata "monocle" of player
   stop loop
  else:
   apply slowness {@slowness} without particles to player for 5 seconds
  set {_c} to false
  player is alive
  player's helmet is {@monocle}
  player is sneaking
  set {_c} to true
  wait 1 tick
 

on right click on lead:
 item is {@monocle}
 cancel event
 set {_i} to 1 of item
 remove {_i} from player's inventory
 set player's helmet to {_i}

 

Edited by Deflecto
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Deflecto said:

I'm not sure if this is a clientside animation for the zooming. It may be the case that the client determines when it zooms in, similar to how bows show a custom animation when you pull them. It's possible though for you to still create a zoom effect by applying slowness to the player.

Wow nice! You are correct, the animations are clientside

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...