Advertisement
4epB9Ik

cmd

Sep 10th, 2020
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. local component = require("component")
  2. local cmd = "time set day"
  3. local cb = component.command_block -- get primary command block
  4. -- os.time() returns "in-game seconds" with a 6000 tick offset, so that
  5. -- midnight is actually midnight.
  6. local ticks = math.floor(1000/60/60 * os.time() - 6000)
  7. print(os.date())
  8. cb.setValue(cmd)
  9. cb.run()
  10. print(os.date())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement