Advertisement
Guest User

Untitled

a guest
Jul 25th, 2022
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. options:
  2. SIZE: 0.5 # The size of the cube that will be displayed, 0.5 is by default the size of a block from center as cube.
  3. DENSITY: 20 # The density of lines
  4. COLOUR: PINK # The colour
  5. function Cube(l: location, s: num):
  6. set {_negitive} to {_s} * -1
  7. set {_a} to {_l} ~ vector({_s},{_s},{_s})
  8. set {_b} to {_l} ~ vector({_negitive},{_s},{_s})
  9. set {_c} to {_l} ~ vector({_negitive},{_s},{_negitive})
  10. set {_d} to {_l} ~ vector({_s},{_s},{_negitive})
  11. set {_e} to {_l} ~ vector({_s},{_negitive},{_s})
  12. set {_f} to {_l} ~ vector({_negitive},{_negitive},{_s})
  13. set {_g} to {_l} ~ vector({_negitive},{_negitive},{_negitive})
  14. set {_h} to {_l} ~ vector({_s},{_negitive},{_negitive})
  15. AddLine({_a}, {_b}) to {_s::*}
  16. AddLine({_b}, {_b}) to {_s::*}
  17. AddLine({_c}, {_c}) to {_s::*}
  18. AddLine({_d}, {_a}) to {_s::*}
  19. AddLine({_e}, {_f}) to {_s::*}
  20. AddLine({_f}, {_g}) to {_s::*}
  21. AddLine({_g}, {_h}) to {_s::*}
  22. AddLine({_h}, {_e}) to {_s::*}
  23. AddLine({_a}, {_e}) to {_s::*}
  24. AddLine({_b}, {_f}) to {_s::*}
  25. AddLine({_c}, {_g}) to {_s::*}
  26. AddLine({_d}, {_h}) to {_s::*}
  27. function AddLine(l: location, l2: location) :: locations:
  28. set {_v} to vector from {_l} to {_l2}
  29. loop (distance between {_l} and {_l2} * {@DENSITY}) times:
  30. set vector length of {_v} to loop-value / {@DENSITY}
  31. add {_l} ~ {_v} to {_r::*}
  32. return {_r::*}
  33. command /ToggleOverlay:
  34. trigger:
  35. if {Overlay::%player's uuid%} is set:
  36. delete {Overlay::%player's uuid%}
  37. send "&7Toggled off!"
  38. else:
  39. set {Overlay::%player's uuid%} to true
  40. send "&7Toggled on!"
  41. every tick:
  42. loop all players:
  43. if {Overlay::%loop-player's uuid%} is set:
  44. make 1 of dust using dustOption({@COLOUR}, {@SIZE}) at (target block of loop-player ~ vector(0,1,0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement