SHARE
TWEET

Flag

King0fGamesYami May 31st, 2016 204 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI( "commandsPlus" )
  2. os.loadAPI( "partTerm" )
  3. if not commandsPlus then
  4.   error( "Must have commandsPlus installed!", 2 )
  5. elseif not partTerm then
  6.   error( "Must have partTerm installed!", 2 )
  7. end
  8. local image = paintutils.loadImage( ".flag" )
  9.  
  10. local player = commandsPlus.getNearbyPlayers( "10" )[1]
  11. if not player then
  12.   error( "Please move closer to the computer and try again", 2 )
  13. end
  14. local x, y, z = commandsPlus.getPlayerPosition( player )
  15.  
  16. local win = partTerm.createWindow( x, y + 2, z, 49, 13 )
  17. partTerm.setDensity( 150 )
  18. win.center( false )
  19. win.setParticle( "mobSpell" )
  20. local oldTerm = term.redirect( win )
  21. paintutils.drawImage( image, 1, 1 )
  22.  
  23. parallel.waitForAll(
  24.    function()
  25.      while true do
  26.        local x, y, z = commandsPlus.getPlayerPosition( player )
  27.        win.reposition( x, y + 2, z )
  28.      end
  29.    end,
  30.    function()
  31.      while true do
  32.        local a, b = commandsPlus.getPlayerRotation( player )
  33.        win.setAngles( a + 90 )
  34.      end
  35.    end,
  36.    partTerm.render
  37. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top