Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local IDPT1 = math.random(1111, 9999)
- local IDPT2 = math.random(1111, 9999)
- local IDPT3 = math.random(1111, 9999)
- local ID = IDPT1 + IDPT2 + IDPT3
- local MS = game:GetService("MarketplaceService")
- local rankIDs = {
- R1 = 1169257649,
- R2 = 1169259363,
- R3 = 1169260841,
- R4 = 1169268622,
- R5 = 1169273209
- }
- local cmds = {
- {
- Rank = 1,
- Command = "btools",
- Execute = function() print("btools!") end
- }
- }
- local bindableFunc = Instance.new("BindableFunction", game.ReplicatedStorage)
- function dphr(rank, plr)
- return true
- end
- function Cmd(cmd, plr)
- for i,v in pairs(cmds) do
- if v.Command == cmd then
- if dphr(v.Rank, plr) then
- v.Execute()
- return true
- else
- MS:PromptPurchase(rankIDs.R..v.Rank, plr)
- end
- end
- end
- print("Command not found: "..cmd)
- end
- function isR6(char)
- if char:FindFirstChild("Torso") then
- return true
- else
- return false
- end
- end
- function createTab(args)
- local Main = Instance.new("Model", args.Store)
- local Tab = Instance.new("Model", Main)
- Tab.Name = "[Glade Tabs] "..args.Text
- local Block = Instance.new("Part", Tab)
- Block.Anchored = true
- Block.Name = "Head"
- Block.BrickColor = args.Color
- Block.TopSurface = "1"
- Block.BottomSurface = "1"
- if isR6(args.Store) then
- local ps = args.Store.Torso.Position
- local Vec = Vector3.new(ps.X, ps.Y, ps.Z)
- Block.Position = Vec
- else
- local ps = args.Store.UpperTorso.Position
- local Vec = Vector3.new(ps.X, ps.Y, ps.Z)
- Block.Position = Vec
- end
- local Human = Instance.new("Humanoid", Tab)
- Human.Name = "DisplayFeature"
- local Click = Instance.new("ClickDetector", Block)
- Click.Name = "Click"
- Click.MaxActivationDistance = 9999999
- Click.MouseClick:connect(function(plr)
- print("Clicked")
- Main:Destroy()
- end)
- if args.Border ~= nil then
- local border = Instance.new("SelectionBox", Tab)
- border.Adornee = Block
- border.Color3 = args.Border.Color
- end
- end
- function scanplrs()
- for i,v in pairs(game.Players:GetChildren()) do
- if v:FindFirstChild("GladeTabs") ~= true then
- local gt = Instance.new("Folder", v)
- gt.Name = "GladeTabs"..ID
- end
- end
- end
- game.Players.PlayerAdded:connect(function(player)
- print(player.Name.." joined")
- scanplrs()
- player.Chatted:connect(function(msg)
- if string.sub(msg, 1, 3) == "gl/" then
- Cmd(string.sub(msg, 4), v)
- elseif string.sub(msg, 1, 6) == "/e gl/" then
- Cmd(string.sub(msg, 7), v)
- end
- end)
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name ~= player.Name then
- createTab({
- Text = player.Name.." joined the game";
- Store = v.Character;
- Color = BrickColor.new(255, 255, 255);
- Callback = "Destroy";
- Border = {
- Color = Color3.new(0, 255, 0);
- };
- Owner = v.Name
- })
- end
- end
- end)
- game.Players.PlayerRemoving:connect(function(player)
- print(player.Name.." left")
- scanplrs()
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name ~= player.Name then
- createTab({
- Text = player.Name.." left the game";
- Store = v.Character;
- Color = BrickColor.new(255, 255, 255);
- Callback = "Destroy";
- Border = {
- Color = Color3.new(255, 0, 0);
- };
- Owner = v.Name
- })
- end
- end
- end)
- scanplrs()
- for i,v in pairs(game.Players:GetChildren()) do
- v.Chatted:connect(function(msg)
- if string.sub(msg, 1, 3) == "gl/" then
- print("Command execution")
- Cmd(string.sub(msg, 4), v)
- elseif string.sub(msg, 1, 6) == "/e gl/" then
- print("Command execution")
- Cmd(string.sub(msg, 7), v)
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement