salahzar

changeColorOnClickDown.js

Nov 14th, 2021 (edited)
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //  changeColorOnClickDown.js
  2. (function () {
  3.  
  4. function rndByte() {
  5.   return (Math.floor(Math.random() * Math.floor(255))).toString();
  6. }
  7.     this.clickDownOnEntity = function (entityID, mouseEvent) {
  8.             Entities.editEntity(entityID,
  9.                 { color: { red: rndByte(), green: rndByte(), blue: rndByte()} }
  10.             );
  11.     };
  12. })
  13.  
Add Comment
Please, Sign In to add comment