Advertisement
Guest User

TEST1

a guest
Jul 7th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.21 KB | None | 0 0
  1. --CHANGE "page_10" IN BANK TO DESIRED PAGE--
  2.  
  3. local bank = game.Players.LocalPlayer.PlayerGui.GUI.inventory.globalItems.page_10 --BANK LOCATION
  4. local slot = "item (0, 0)" --BASE SLOT NAME
  5.  
  6. --CONFIGURABLE--
  7.  
  8. local rItem = "item7.62 Clip" --CHECK LIGHTING/ASSETS FOR LIST
  9. local rCount = 1           --CHANGE TO NUMBER OF ITEMS
  10. local mass = true        --FILLS THE ENTIRE PAGE
  11. local singleItem = false --FILLS FIRST SLOT
  12. local singleLine = false  --FILLS ENTIRE LINE VERTICAL
  13.  
  14. local cItem = "item7.62mm Clip"
  15. local getMaxCount = true --GETS MAX COUNT OF ITEM
  16. local getList = false          --GETS LIST OF ALL ITEMS
  17.  
  18. --[[
  19. MAX NUMBER OF ITEMS FOR ALL EXCEPT WEAPONS
  20. AND AMMO IS 32, MAX FOR AMMO IS INTIAL AMMOUNT
  21. YOU'LL FIND IN A CLIP WHEN IT SPAWNS, YOU CAN FIND THAT
  22. VALUE IN LIGHTING/ASSETS. MAX COUNT FOR WEAPONS IS 1.
  23. IF YOU TRY TO CHANGE THE COUNT TO ABOVE MAX YOU'LL
  24. DIE SO DON'T DO IT.
  25. --]]
  26.  
  27. --BASE CODE--
  28.  
  29. if mass == false and singleItem == false and singleLine == false then
  30.    print("ERROR: You need to set one of the spawn types to true.")
  31. end
  32.  
  33. if singleItem == true then
  34. for i = 0, 0 do
  35.    slot = "item (0, "..i..")"
  36.    bank[slot].item.Value = rItem
  37.    bank[slot].count.Value = rCount
  38.    print("Added item type of: ("..rItem..") to slot: ("..slot..") of count ("..rCount.. ")")
  39. end
  40. end
  41.  
  42. if singleLine == true then
  43. for i = 0, 5 do
  44.    slot = "item (0, "..i..")"
  45.    bank[slot].item.Value = rItem
  46.    bank[slot].count.Value = rCount
  47.    print("Added item type of: ("..rItem..") to slot: ("..slot..") of count ("..rCount.. ")")
  48. end
  49. end
  50.  
  51. if mass == true then
  52. for i = 0, 5 do
  53.    slot = "item (0, "..i..")"
  54.    bank[slot].item.Value = rItem
  55.    bank[slot].count.Value = rCount
  56.    print("Added item type of: ("..rItem..") to slot: ("..slot..") of count ("..rCount.. ")")
  57. end
  58.  
  59. for i = 0, 5 do
  60.    slot = "item (1, "..i..")"
  61.    bank[slot].item.Value = rItem
  62.    bank[slot].count.Value = rCount
  63.    print("Added item type of: ("..rItem..") to slot: ("..slot..") of count ("..rCount.. ")")
  64. end
  65.  
  66. for i = 0, 5 do
  67.    slot = "item (2, "..i..")"
  68.    bank[slot].item.Value = rItem
  69.    bank[slot].count.Value = rCount
  70.    print("Added item type of: ("..rItem..") to slot: ("..slot..") of count ("..rCount.. ")")
  71. end
  72.  
  73. for i = 0, 5 do
  74.    slot = "item (3, "..i..")"
  75.    bank[slot].item.Value = rItem
  76.    bank[slot].count.Value = rCount
  77.    print("Added item type of: ("..rItem..") to slot: ("..slot..") of count ("..rCount.. ")")
  78. end
  79.  
  80. for i = 0, 5 do
  81.    slot = "item (4, "..i..")"
  82.    bank[slot].item.Value = rItem
  83.    bank[slot].count.Value = rCount
  84.    print("Added item type of: ("..rItem..") to slot: ("..slot..") of count ("..rCount.. ")")
  85. end
  86.  
  87. for i = 0, 5 do
  88.    slot = "item (5, "..i..")"
  89.    bank[slot].item.Value = rItem
  90.    bank[slot].count.Value = rCount
  91.    print("Added item type of: ("..rItem..") to slot: ("..slot..") of count ("..rCount.. ")")
  92. end
  93. end
  94.  
  95. --[[
  96. ps. Hey guys! I'm a begginer at lua so don't laugh at my code
  97. please, to do this I had to look most of it up... so lol
  98. if it's not optimized that's expected. Will be adding to this
  99. script in the future to come =)
  100. --]]
  101.  
  102. --BETA FUNCTIONS
  103. local fullItems = game.Lighting.assets.items
  104.  
  105. if
  106. print(fullItems[cItem].count.Value)
  107.  
  108.  
  109.  
  110.  
  111. --END--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement