Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local gui = game:GetObjects("rbxassetid://01354696646")[1]
- gui.Parent = game.CoreGui
- --PlayerList
- print("Broken Chapter ;) by DaddySauce")
- local players = game:GetService("Players")
- local frame = gui.UI.Players.List
- local slots = frame
- local temp = gui.UI.Topbar.Template
- local players_table = {}
- local dir = "Out"
- local style = "Quad"
- local dur = 0.5
- local function cleanup(slot)
- repeat
- wait()
- until slot.Position.X.Offset == 100
- slot:Destroy()
- end
- local function remove(leaving)
- if leaving then
- players_table[leaving] = nil
- local slot = slots:FindFirstChild(leaving)
- slot:TweenPosition(UDim2.new(0, 100, 0, slot.Position.Y.Offset), dir, style, dur, true)
- local cor = coroutine.wrap(cleanup)
- cor(slot)
- end
- end
- local function add()
- local chil = players:GetChildren()
- for c = 1, #chil do
- if players_table[chil[c].Name] == nil then
- players_table[chil[c].Name] = 1
- local slot = temp:Clone()
- slot.Visible = true
- slot.Name = chil[c].Name
- slot.Text = slot.Name
- slot.Parent = slots
- slot.MouseButton1Click:connect(function()
- gui.UI.Players.Player.Text = slot.Text
- gui.UI.Players.Avatar.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=200&Format=Png&username="..slot.Text
- gui.UI.Players.Age.Text = "Age: "..game.Players[slot.Text].AccountAge
- gui.UI.Players.UserId.Text = "UserID: "..game.Players[slot.Text].UserId
- end)
- end
- end
- end
- local function adjust(leaving)
- add()
- remove(leaving)
- local count = 0
- for key, value in pairs(players_table) do
- count = count + 1
- local slot = slots:FindFirstChild(key)
- local ypos = 10 + (20+2)*(count-1)
- print(count)
- if count > 5 then
- gui.UI.Players.List.CanvasSize = UDim2.new(0, 0, 1.5, 0)
- end
- if count > 6 then
- gui.UI.Players.List.CanvasSize = UDim2.new(0, 0, 1.7, 0)
- end
- if count > 7 then
- gui.UI.Players.List.CanvasSize = UDim2.new(0, 0, 1.9, 0)
- end
- if count > 8 then
- gui.UI.Players.List.CanvasSize = UDim2.new(0, 0, 2.1, 0)
- end
- if count > 9 then
- gui.UI.Players.List.CanvasSize = UDim2.new(0, 0, 2.3, 0)
- end
- if count > 10 then
- gui.UI.Players.List.CanvasSize = UDim2.new(0, 0, 2.5, 0)
- end
- if count > 11 then
- gui.UI.Players.List.CanvasSize = UDim2.new(0, 0, 2.7, 0)
- end
- end
- end
- players.PlayerAdded:connect(function()
- adjust(nil)
- end)
- players.PlayerRemoving:connect(function(leaving)
- adjust(leaving.Name)
- end)
- adjust()
- --PlayerCommands
- --Selection
- gui.UI.Selection.Players.MouseButton1Click:connect(function()
- gui.UI.Selection["Bar"]:TweenPosition(UDim2.new(0.024,0,0.838,0),"Out","Sine",.5,true)
- wait(.05)
- gui.UI.Players.Visible = true
- gui.UI["Devil Fruits"].Visible = false
- end)
- gui.UI.Selection["Devil Fruits"].MouseButton1Click:connect(function()
- gui.UI.Selection["Bar"]:TweenPosition(UDim2.new(0.351,0,0.838,0),"Out","Sine",.5,true)
- wait(.05)
- gui.UI.Players.Visible = false
- gui.UI["Devil Fruits"].Visible = true
- end)
- gui.UI.Selection.Misc.MouseButton1Click:connect(function()
- gui.UI.Selection["Bar"]:TweenPosition(UDim2.new(0.679,0,0.838,0),"Out","Sine",.5,true)
- end)
- --Open and close
- gui.UI.Topbar.Close.MouseButton1Click:connect(function()
- gui.UI.Visible = false
- gui.Open.Visible = true
- end)
- gui.Open.oof.MouseButton1Click:connect(function()
- gui.UI.Visible = true
- gui.Open.Visible = false
- end)
- --Devil Fruit Spawner Buttons
- gui.UI["Devil Fruits"].ScrollingFrame.Bison.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#36700101"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Chop.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#18800166"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Dice.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#18834315"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Kilo.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#18800132"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Mera.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#79900344"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Moku.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#79900228"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Pika.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#79900312"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Suna.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#79900156"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Toge.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#18800188"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Toru.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#36700110"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Wax.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#18800101"
- end)
- gui.UI["Devil Fruits"].ScrollingFrame.Yami.MouseButton1Click:connect(function()
- game.Players.InventoryGui.Inventory.InventorySlot1.Value = "#79900447"
- end)
Advertisement
Add Comment
Please, Sign In to add comment