Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function BlitScreen(mode, sticker, speed, w, a, s, d)
- term.clear()
- if mode == "base" then
- print(string.format(" ## ", symbol_w, symbol_w))
- print(string.format(" # # ", symbol_w, symbol_w))
- print(string.format(" speed # # mode ", symbol_w, symbol_w))
- print(string.format(" >>Tab # suth # >> E ", symbol_w, symbol_w))
- print(string.format(" %d ## ## %s ", speed, mode))
- print(string.format(" # # ", symbol_w, symbol_w))
- print(" # ## # ")
- print(string.format(" # # # # ", symbol_a, symbol_a, symbol_d, symbol_d))
- print(string.format(" # #### #### # ", symbol_a, symbol_a, symbol_a, symbol_a, symbol_a, symbol_d, symbol_d, symbol_d, symbol_d, symbol_d))
- print(string.format("# east # # west #", symbol_a, symbol_a, symbol_d, symbol_d))
- print(string.format(" # #### #### # ", symbol_a, symbol_a, symbol_a, symbol_a, symbol_a, symbol_d, symbol_d, symbol_d, symbol_d, symbol_d))
- print(" # # # # ")
- print(" # ## # ")
- print(" # # ")
- print(" ## ## ")
- print(" # nrth # ")
- print(" # # ")
- print(" # # ")
- print(" ## ")
- elseif mode == "head" then
- print(" ## ")
- print(" # # ")
- print(" speed # # mode ")
- print(" >>Tab # up # >> E ")
- print(string.format(" %d ## ## %s ", speed, mode))
- print(" # # ")
- print(" ## ")
- print(" #### #### ")
- print(" # # <left # # ")
- print(" # ## # # ## # ")
- print(" # # right> # # ")
- print(" # # ")
- print(" ## ")
- print(" # # ")
- print(" sticker ## ## falling ")
- print(" >> Q # down # >>SHIFT ")
- print(string.format(" %s # # %s ", sticker, fall and " ON" or "OFF"))
- print(" # # ")
- print(" ## ")
- end
- end
- local w = false
- local a = false
- local s = false
- local d = false
- local mode = "base"
- local speed = 1
- local sticker = "OFF"
- local fall = false
- BlitScreen(mode, sticker, speed, w, a, s, d)
- while true do
- local event, key, isHeld = os.pullEvent("key")
- if key == keys.e then
- if mode == "base" then
- mode = "head"
- else
- mode = "base"
- end
- end
- if mode == "head" then
- if key == keys.q then
- if sticker == "OFF" then
- sticker = "ON "
- else
- sticker = "OFF"
- end
- end
- end
- if key == keys.tab then
- if speed == 1 then
- speed = 2
- else
- speed = 1
- end
- end
- if key == keys.shift then
- if fall == false then
- fall = true
- else
- fall = false
- end
- end
- if (key == keys.w) and isHeld then
- w = true
- else
- w = false
- end
- if (key == keys.a) and isHeld then
- a = true
- else
- a = false
- end
- if (key == keys.s) and isHeld then
- s = true
- else
- s = false
- end
- if (key == keys.d) and isHeld then
- d = true
- else
- d = false
- end
- BlitScreen(mode, sticker, speed, w, a, s, d)
- local w = false
- local a = false
- local s = false
- local d = false
- os.sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement