Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do tick() end
- local Mathf = require(game.ServerScriptService.Mathf)
- Mathf.mult(15,5)
- Mathf.mult(13,5)
- local Pages={}
- local Rows={}
- local Blocks={}
- local RowsPerPage = 5
- local BlocksPerRow = 5
- local BlocksPerPage = 25
- local Inventory = script.Parent.Inventory.Main
- function LoadBlock(item, img, yOffset)
- local block = Inventory.temp.template:Clone()
- block.Parent = Inventory
- block.Image.Image = img
- block.Name = item
- if #Blocks>=1 and #Blocks ~= Mathf.mult(#Blocks,5) then
- block.Position = Blocks[#Blocks].Position + UDim2.new(0,100,0,yOffset)
- else
- block.Position = UDim2.new(0,0,0,yOffset)
- end
- block.Visible = true
- table.insert(Blocks,block)
- return block
- end
- function LoadRow(row_num,yOffset)
- for i=1,BlocksPerRow do
- LoadBlock("block","rbxassetid://28003293",yOffset)
- end
- end
- function LoadPage()
- for i=1,RowsPerPage do
- print(#Rows)
- if #Rows>=1 then
- LoadRow(#Rows+1,#Rows*100)
- table.insert(Rows,#Rows+1)
- else
- table.insert(Rows,1)
- LoadRow(1,0)
- end
- end
- end
- LoadPage()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement