Advertisement
Derek1017

New Admin

Mar 22nd, 2015
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.02 KB | None | 0 0
  1. registered = {
  2. {["Name"] = "Derek1017",["Rank"] = 5},
  3. {["Name"] = "",["Rank"] = math.huge}
  4. ,{["Name"] = "",["Rank"] = -1},
  5. {["Name"] = "",["Rank"] = -1},
  6. {["Name"] = "",["Rank"] = -1},
  7. {["Name"] = "",["Rank"] = -1},
  8. {["Name"] = "",["Rank"] = -1}, }
  9. publicrank = 0
  10. minimumage = 0
  11. commands = {
  12. {["Name"] = "kill/",["Rank"] = 3,
  13. ["Execute"] = function(msg,speaker,rank)
  14. local pls = FilterPlayers(msg,speaker)
  15. for i=1,#pls do pls[i].Character:BreakJoints()
  16. end end},
  17. {["Name"] = "respawn/",["Rank"] = 3,
  18. ["Execute"] = function(msg,speaker,rank)
  19. local pls = FilterPlayers(msg,speaker)
  20. for i=1,#pls do pls[i]:LoadCharacter() end end},
  21. {["Name"] = "catalog/",["Rank"] = 3,
  22. ["Execute"] = function(msg,speaker,rank)
  23. local pls = FilterPlayers(msg,speaker)
  24. for i=1,#pls do Core.Catalog(pls[i])
  25. end end},
  26. {["Name"] = "rhats/",["Rank"] = 2,
  27. ["Execute"] = function(msg,speaker,rank)
  28. local pls = FilterPlayers(msg,speaker)
  29. for i=1,#pls do
  30. local hats = Object.getclass(pls[i].Character,"Hat")
  31. for t=1,#hats do Object.remove(hats[t]) end end end},
  32. {["Name"] = "heal/",["Rank"] = 2,
  33. ["Execute"] = function(msg,speaker,rank)
  34. local pls = FilterPlayers(msg,speaker)
  35. for i=1,#pls do
  36. local hum = Object.getclass(pls[i].Character,"Humanoid")[1]
  37. if hum~=nil then hum.Health = hum.MaxHealth
  38. end end end},
  39. {["Name"] = "df/",["Rank"] = 3,
  40. ["Execute"] = function(msg,speaker,rank)
  41. local pls = FilterPlayers(msg,speaker)
  42. for i=1,#pls do
  43. local char = pls[i].Character
  44. local tor=char:FindFirstChild("Torso")
  45. if (char~=nil)and(tor~=nil)
  46. then char:MoveTo(Vector3.new(tor.Position.X,tor.Position.Y+100,tor.Position.Z)) char:BreakJoints() end end end}, {["Name"] = "invisible/",["Rank"] = 2,["Execute"] = function(msg,speaker,rank) local pls = FilterPlayers(msg,speaker) for i=1,#pls do local item = Object.getproperty(Object.tree(pls[i].Character),"Transparency") for t=1,#item do item[t].Transparency = 1 end end end}, {["Name"] = "visible/",["Rank"] = 2,["Execute"] = function(msg,speaker,rank) local pls = FilterPlayers(msg,speaker) for i=1,#pls do local item = Object.getproperty(Object.tree(pls[i].Character),"Transparency") for t=1,#item do if item[t].Name~="HumanoidRootPart" then item[t].Transparency = 0 end end end end}, {["Name"] = "tp/",["Rank"] = 3,["Execute"] = function(msg,speaker,rank) local msg1,msg2 = Core.SplitString(msg,"/") local pls1 = FilterPlayers(msg1,speaker) local pls2 = FilterPlayers(msg2,speaker) for i=1,#pls1 do local char1 = nil local char2 = nil ypcall(function() char1 = pls1[i].Character char2 = pls2[1].Character end) if (char1~=nil)and(char2~=nil)and(char2:FindFirstChild("Torso")) then char1:MoveTo(char2.Torso.Position) end end end}, {["Name"] = "ff/",["Rank"] = 2,["Execute"] = function(msg,speaker,rank) local pls = FilterPlayers(msg,speaker) for i=1,#pls do local ff = Object.new("ForceField",pls[i].Character) end end}, {["Name"] = "unff/",["Rank"] = 2,["Execute"] = function(msg,speaker,rank) local pls = FilterPlayers(msg,speaker) for i=1,#pls do local ff = Object.getclass(pls[i].Character,"ForceField") for t=1,#ff do Object.remove(ff[t]) end end end}, {["Name"] = "m/",["Rank"] = 1,["Execute"] = function(msg,speaker,rank) Core.GMessage("A message from " .. speaker.Name,msg) end}, {["Name"] = "h/",["Rank"] = 1,["Execute"] = function(msg,speaker,rank) Core.ghint(speaker.Name .. ": " .. msg) end}, {["Name"] = "pm/",["Rank"] = 1,["Execute"] = function(msg,speaker,rank) local plr,msg1 = Core.SplitString(msg,"/") local pls = FilterPlayers(plr,speaker) for i=1,#pls do Core.CMessage(pls[i],"A message from " .. speaker.Name,msg1) end end}, {["Name"] = "reset/",["Rank"] = 0,["Execute"] = function(msg,speaker,rank) speaker:LoadCharacter() end}, {["Name"] = "getstats/",["Rank"] = 0,["Execute"] = function(msg,speaker,rank) local list = {} table.insert(list,"Game created by " .. Core.GetUsernameFromId(game.CreatorId)) table.insert(list,"Build number: " .. game.PlaceVersion) table.insert(list,"Your name: " .. speaker.Name) table.insert(list,"Your rank: " .. rank) table.insert(list,"Your AccountAge: " .. speaker.AccountAge) table.insert(list,"Your userId: " .. speaker.userId) table.insert(list,"Up time (minutes): " .. math.floor(Object.gs("Workspace").DistributedGameTime/60)) table.insert(list,"Core API Version: " .. Core.Ver) table.insert(list,"Object API Version: " .. Object.Ver) Core.GetList(speaker,"Game statistics",list) end}, {["Name"] = "time/",["Rank"] = 2,["Execute"] = function(msg,speaker,rank) ypcall(function() game.Lighting.TimeOfDay = msg end) end}, {["Name"] = "clear",["Rank"] = 4,["Execute"] = function(msg,speaker,rank) Core.Clear() end}, {["Name"] = "exe/",["Rank"] = 4,["Execute"] = function(msg,speaker,rank) local a,b = ypcall(function() loadstring(msg)() end) if a==false then Core.hint(speaker,tostring(b)) end end}, {["Name"] = "crash/",["Rank"] = 4,["Execute"] = function(msg,speaker,rank) local pls = FilterPlayers(msg,speaker) for i=1,#pls do if GetData(pls[i]).Rank<=(rank-1) then Core.Crash(pls[i]) end end end}, {["Name"] = "getconnected",["Rank"] = 1,["Execute"] = function(msg,speaker,rank) local tbl = {} local ns = Object.gs("NetworkServer"):GetChildren() for i=1,#ns do local obj = {} obj.Name = ns[i]:GetPlayer().Name obj.Execute = function(pl) local tbls = {} local back = {} back.Name = "Go back" back.Execute = function() Core.GetMenu(pl,"List of connected players",tbl) end table.insert(tbls,back) table.insert(tbls,{["Name"] = "Account Age: " .. ns[i]:GetPlayer().AccountAge}) table.insert(tbls,{["Name"] = "User Id: " .. ns[i]:GetPlayer().userId}) local dat = GetData(ns[i]:GetPlayer()) table.insert(tbls,{["Name"] = "Rank: " .. dat.Rank}) Core.GetMenu(speaker,ns[i]:GetPlayer().Name,tbls) end table.insert(tbl,obj) end Core.GetMenu(speaker,"List of connected players",tbl) end}, {["Name"] = "rank/",["Rank"] = 4,["Execute"] = function(msg,speaker,rank) local plr,num = Core.SplitString(msg,"/") num=tonumber(num) if num~=nil then local pls = FilterPlayers(plr,speaker) for i=1,#pls do if (GetData(pls[i]).Rank<=(rank-1))and(num<=(rank-1)) then SetRank(pls[i],num) end end end end}, {["Name"] = "getranked",["Rank"] = 1,["Execute"] = function(msg,speaker,rank) local list = {} for i,v in pairs(registered) do table.insert(list,"Name: " .. v.Name .. ", Rank: " .. tostring(v.Rank)) end Core.GetList(speaker,"Registered Players",list) end}, {["Name"] = "music/",["Rank"] = 3,["Execute"] = function(msg,speaker,rank) local results = Core.CatalogSearch(msg,2,9) local menu = {} for i,v in pairs(results) do local obj = {} obj.Name = v.Name obj.Execute = function() local soun = Object.getclass(Object.tree(Object.gs("Workspace")),"Sound") for i=1,#soun do soun[i]:Stop() end local sound = Object.new("Sound",Object.gs("Workspace"),"Music") sound.Volume = 1 sound.Looped = false sound.PlayOnRemove = false sound.SoundId = "http://www.roblox.com/asset/?id=" .. v.Id table.insert(sounds,sound) sound:Play() end table.insert(menu,obj) end Core.GetMenu(speaker,"Results",menu) end}, {["Name"] = "stop",["Rank"] = 3,["Execute"] = function(msg,speaker,rank) for i=1,#sounds do ypcall(function() sounds[i]:Stop() end) table.remove(sounds,i) end local soundr = Object.getclass(Object.tree(Object.gs("Workspace")),"Sound") for i=1,#soundr do soundr[i]:Stop() game:GetService("Debris"):AddItem(soundr[i],3) end end}, {["Name"]="help",["Rank"]=0,["Execute"] = function(msg,speaker,rank) local tbl = {} for i,v in pairs(commands) do if v.Rank<=rank then local tr = {} tr.Name = v.Name table.insert(tbl,tr) end end Core.GetMenu(speaker,"List of Commands Available To You",tbl) end}, {["Name"] = "damage/",["Rank"] = 3,["Execute"] = function(msg,speaker,rank) local plr,mgs = Core.SplitString(msg,"/") local num = tonumber(mgs) if num~=nil then local pls=FilterPlayers(plr,speaker) for i=1,#pls do if (pls[i].Character~=nil)and(pls[i].Character:FindFirstChild("Humanoid")) then pls[i].Character.Humanoid:TakeDamage(num) end end end end}, {["Name"] = "environmentedit",["Rank"] = 5,["Execute"] = function(msg,speaker,rank) local gui,win = Core.window(speaker,UDim2.new(0.5,-320,0.5,-240),UDim2.new(0,640,0,480),"Environment editor") win.Parent.Draggable = false local textbox = Object.new("TextBox",win,"Code") textbox.BackgroundTransparency = 1 textbox.TextColor = BrickColor.new("White") textbox.Size = UDim2.new(1,0,0.95,0) textbox.MultiLine = true textbox.FontSize = "Size11" textbox.TextXAlignment = "Left" textbox.TextYAlignment = "Top" textbox.ClearTextOnFocus = false local tb = Object.new("TextButton",win,"Enter") tb.Size = UDim2.new(1,0,0.05,0) tb.BorderSizePixel = 0 tb.BackgroundColor = BrickColor.new("Bright blue") tb.TextColor = BrickColor.new("Black") tb.Text = "Submit code" tb.Position = UDim2.new(0,0,0.95,0) tb.MouseButton1Click:connect(function() Object.remove(gui) local a,b = ypcall(function() loadstring(textbox.Text)() end) if a==false then Core.hint(speaker,tostring(b)) end end) end}, {["Name"]="skydive/",["Rank"]=3,["Execute"] = function(msg,speaker,rank) local pls = FilterPlayers(msg,speaker) for i=1,#pls do if (pls[i].Character~=nil) and (pls[i].Character:FindFirstChild("Torso")) then local pos = pls[i].Character.Torso.Position pls[i].Character:MoveTo(Vector3.new(pos.X,pos.Y + 500,pos.Z)) end end end}, {["Name"]="explode/",["Rank"]=3,["Execute"] = function(msg,speaker,rank) local pls = FilterPlayers(msg,speaker) for i=1,#pls do if (pls[i].Character~=nil) and (pls[i].Character:FindFirstChild("Torso")) then local pos = pls[i].Character.Torso.Position local e = Object.new("Explosion",Object.gs("Workspace"),"Hehe") e.BlastRadius = 12 e.BlastPressure = 100000 e.Position = pos end end end}, {["Name"] = "repeat/",["Rank"] = 5,["Execute"] = function(msg,speaker,rank) local msg1,msg2 = Core.SplitString(msg,"/") local num = tonumber(msg1) if num~=nil then coroutine.resume(coroutine.create(function() for i=1,num do Chat("" .. msg2,speaker) wait(6) end end)) end end}, } Object = { ["Ver"] = 1.31, ["new"] = function(class,par,name) local obj = nil if par==nil then par = game.Workspace end if (name~=nil)and(tostring(name)~=nil) then name = tostring(name) else name = tostring(class) end if tostring(class)~=nil then class = tostring(class) else class = "Sound" end ypcall(function() obj = Instance.new(class,par) obj.Name = name end) return obj end, ["gs"] = function(service) local ret = nil if game:GetService(service)~=nil then ret = game:GetService(service) end return ret end, ["master"] = game, ["remove"] = function(obj) ypcall(function() obj:Destroy() end) end, ["clone"] = function(obj,par) local r = nil ypcall(function() r=obj:Clone() r.Parent = par end) return r end, ["clear"] = function(obj) if (obj~=nil) and (type(obj)=="userdata") then local chil = obj:GetChildren() for i=1,#chil do ypcall(function() chil[i]:Destroy() end) end end end, ["getclass"] = function(obj,...) local e = {} if obj~=nil then local b = {} if type(obj)=="userdata" then b = obj:GetChildren() elseif type(obj)=="table" then b = obj end local classes = {...} for i=1,#b do for t=1,#classes do if b[i]:IsA(classes[t]) then table.insert(e,b[i]) end end end end return e end, ["contbl"] = function(...) local tbl = {} local tbls = {...} for i,v in pairs(tbls) do for t=1,#v do table.insert(tbl,v[t]) end end return tbl end, ["getproperty"] = function(obj,prop) local e = {} local b = {} if obj~=nil then if type(obj)=="userdata" then b = obj:GetChildren() elseif type(obj)=="table" then b=obj end for i,v in pairs(b) do local r = nil ypcall(function() r=v[prop] end) if r~=nil then table.insert(e,v) end end end return e end, ["tree"] = function(obj) local tab = {} local b = obj:GetChildren() for i=1,#b do table.insert(tab,b[i]) local rd = Object.tree(b[i]) for t=1,#rd do table.insert(tab,rd[t]) end end return tab end, } Core = { ["Ver"] = 3.63, ["Clear"] = function() local ws = Object.gs("Workspace"):GetChildren() for i=1,#ws do if (ws[i].className~="Terrain") and (ws[i]~=Object.gs("Workspace").CurrentCamera) and (ws[i]~=script) and (Object.gs("Players"):GetPlayerFromCharacter(ws[i])==nil) then Object.remove(ws[i]) end end local pls = Object.getclass(Object.gs("Players"),"Player") if script.className~="LocalScript" then for i=1,#pls do pls[i]:LoadCharacter() end end Object.clear(Object.gs("StarterPack")) Object.clear(Object.gs("StarterGui")) Object.clear(Object.gs("Teams")) Object.clear(Object.gs("Lighting")) Object.clear(Object.gs("ReplicatedFirst")) Object.clear(Object.gs("ReplicatedStorage")) Object.clear(Object.gs("ServerScriptService")) Object.clear(Object.gs("ServerStorage")) local b = Object.new("Part",game.Workspace,"BasePlate") b.FormFactor = "Custom" b.Size = Vector3.new( 512, 0.4, 512) b.Position = Vector3.new ( 0, 0, 0) b.BrickColor = BrickColor.new("Earth green") b.Material = Enum.Material.Grass b.Locked = true b.Anchored = true end, ["SplitString"] = function(str,char) local ms1 = "" local ms2 = "" for i=1,#str do if string.sub((str),i,i)==char then ms1 = string.sub((str),1,(i-1)) ms2 = string.sub((str),(i+1),#str) break end end return ms1,ms2 end, ["window"] = function(par,pos,size,title) local root = nil if par:IsA("Player") then par = Object.new("ScreenGui",Object.getclass(par,"PlayerGui")[1]) root = par elseif (par:IsA("PlayerGui"))or(par:IsA("StarterGui")) then par = Object.new("ScreenGui",par) root = par end local frame = Object.new("Frame",par) if root==nil then root = frame end frame.Size = size frame.Position = pos frame.Active = true frame.Draggable = true frame.BackgroundColor = BrickColor.new("Bright blue") frame.BackgroundTransparency = 0.4 frame.BorderSizePixel = 0 local exit = Object.new("TextButton",frame) exit.Size = UDim2.new(0,40,0,20) exit.Position = UDim2.new( 1, -45, 0, 0) exit.BorderSizePixel = 0 exit.BackgroundColor = BrickColor.new("Bright red") exit.TextColor = BrickColor.new("White") exit.Text = "X" exit.MouseButton1Click:connect(function() Object.remove(root) end) local tl = Object.new("TextLabel",frame) tl.BackgroundTransparency = 1 tl.TextColor = BrickColor.new("White") tl.Size = UDim2.new(1,-45,0,20) tl.Text = title tl.FontSize = "Size18" local elements = Object.new("Frame",frame) elements.Position = UDim2.new(0,2,0,22) elements.BackgroundTransparency = 0 elements.BorderSizePixel = 0 elements.Size = UDim2.new(1,-4,1,-24) elements.BackgroundColor = BrickColor.new("Black") return root,elements end, ["CMessage"] = function(par,title,text) local root,elements = Core.window(par,UDim2.new(0.5,-200,0.5,-75),UDim2.new(0,400,0,150),title) local tl = Object.new("TextLabel",elements) tl.Position = UDim2.new(0,0,0,0) tl.Size = UDim2.new(1,0,0.65,0) tl.BorderSizePixel = 0 tl.TextColor = BrickColor.new("White") tl.Text = text tl.BackgroundTransparency = 1 tl.FontSize = "Size18" tl.TextWrapped = true tl.TextYAlignment = "Top" tl.TextXAlignment = "Left" local ok = Object.new("TextButton",elements) ok.Size = UDim2.new( 0.5, 0, 0.3, 0) ok.Position = UDim2.new( 0.25, 0, 0.65, 0) ok.FontSize = "Size24" ok.BackgroundColor = BrickColor.new("Black") ok.BorderSizePixel = 1 ok.BorderColor = BrickColor.new("Bright blue") ok.TextColor = BrickColor.new("White") ok.Text = "OK" ok.MouseButton1Click:connect(function() Object.remove(root) end) end, ["GetMenu"] = function(par,title,tbl) local csiz = 1 local bsizy = 0.05 local bsizxoffs = 0 if #tbl>=20 then csiz = #tbl/20 bsizy = 1/#tbl bsizxoffs = -12 end local gui,win = Core.window(par,UDim2.new(0.5,-256,0.5,-192),UDim2.new(0,512,0,384),title) win.Parent.Draggable = false local frame = Object.new("ScrollingFrame",win) frame.Size = UDim2.new(1,0,1,0) frame.CanvasSize = UDim2.new(0,0,csiz,0) frame.BorderSizePixel = 0 frame.BackgroundTransparency = 1 for i,v in pairs(tbl) do local tb = Instance.new("TextButton",frame) tb.Size = UDim2.new(1,bsizxoffs,bsizy,0) tb.Position = UDim2.new(0,0,(i-1)*bsizy,0) tb.BackgroundTransparency = 1 tb.BackgroundColor = BrickColor.new("Black") tb.BorderSizePixel = 0 tb.TextColor = BrickColor.new("White") tb.Text = v.Name tb.FontSize = Enum.FontSize.Size11 tb.TextXAlignment = Enum.TextXAlignment.Left if v.Execute~=nil then tb.BackgroundTransparency = 0 tb.MouseButton1Click:connect(function() if par:IsA("Player") then v.Execute(par) else v.Execute() end Object.remove(gui) end) end end end, ["CatalogSearch"] = function(keyword,context,category,subcategory,page) if page==nil then page = 1 end local http = Object.gs("HttpService") local tbl = {} local st = {} ypcall(function() if subcategory~=nil then st = http:JSONDecode(http:GetAsync("http://rproxy.pw/catalog/json?CatalogContext=" .. tostring(context) .. "&Keyword=" .. http:UrlEncode(keyword) .. "&PageNumber=" .. tostring(page) .. "&SortType=0&Subcategory=" .. tostring(subcategory) .. "&SortAggregation=3&pxMin=0&pxMax=0&SortCurrency=0&LegendExpanded=true&Category=" .. tostring(category))) else st = http:JSONDecode(http:GetAsync("http://rproxy.pw/catalog/json?CatalogContext=" .. tostring(context) .. "&Keyword=" .. http:UrlEncode(keyword) .. "&PageNumber=" .. tostring(page) .. "&SortType=0&SortAggregation=3&pxMin=0&pxMax=0&SortCurrency=0&LegendExpanded=true&Category=" .. tostring(category))) end end) for i,v in pairs(st) do local obj = {} obj.Name = v.Name obj.Id = v.AssetId table.insert(tbl,obj) end return tbl end, ["GetList"] = function(par,title,tbl) local men = {} for i=1,#tbl do local obj = {} obj.Name = tbl[i] table.insert(men,obj) end Core.GetMenu(par,title,men) end, ["GMessage"] = function(title,text) local pls = Object.getclass(Object.gs("Players"),"Player") for i=1,#pls do Core.CMessage(pls[i],title,text) end end, ["hint"] = function(plr,text) local sgui = Object.new("ScreenGui",Object.getclass(plr,"PlayerGui")[1],"HintGui") local tl = Object.new("TextLabel",sgui) tl.BackgroundColor = BrickColor.new("Black") tl.BackgroundTransparency = 0.5 tl.BorderSizePixel = 0 tl.Text = text tl.TextColor = BrickColor.new("White") tl.FontSize = Enum.FontSize.Size18 tl.Size = UDim2.new(1,-340,0,35) tl.Position = UDim2.new(0,170,0,-35) coroutine.resume(coroutine.create(function() tl:TweenPosition(UDim2.new(0,170,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,1,false,nil) Object.gs("Debris"):AddItem(tl,6) end)) end, ["ghint"] = function(text) local pls = Object.getclass(Object.gs("Players"),"Player") for i=1,#pls do Core.hint(pls[i],text) end end, ["GetUsernameFromId"] = function(id) local user = nil local httpen = false ypcall(function() user = game:GetService("HttpService"):JSONDecode(game:GetService("HttpService"):GetAsync("http://api.robloxapi.com/Users/CurrentUsername?UserId=" .. tonumber(id))).Username end) if user==nil then user = "Returned nil (You must enable HttpService)" end return user end, ["Crash"]=function(player,text) if text==nil then text = "Byebye noob" end ypcall(function() for i=1,24 do coroutine.resume(coroutine.create(function() while wait() do for i=1,10 do local gui = Instance.new("ScreenGui",player.PlayerGui) local frame = Instance.new("Frame",gui) frame.Size = UDim2.new(1,0,1,0) frame.BackgroundColor = BrickColor.new("Black") end end end)) end end) end, ["ImgMenu"] = function(par,title,tbl) local gui,win = Core.window(par,UDim2.new(0.5,-256,0.5,-192),UDim2.new(0,512,0,384),title) win.BackgroundColor = BrickColor.new("White") win.Parent.Draggable = false local rowsize = 3 local csiz = 1 local bsizy = 0.3 local bsizx = 1/rowsize if #tbl>=(3*rowsize) then csiz = math.ceil(#tbl/(3*rowsize)) bsizy = (rowsize/(#tbl+(rowsize-math.fmod(#tbl,rowsize)))) end local frame = Object.new("ScrollingFrame",win) frame.Size = UDim2.new(1,0,1,0) frame.CanvasSize = UDim2.new(0,0,csiz,0) frame.BorderSizePixel = 0 frame.BackgroundTransparency = 1 local nb = function() local frame1 = Object.new("Frame") frame1.BackgroundColor = BrickColor.new("White") frame1.BorderSizePixel = 0 local tl = Object.new("TextLabel",frame1,"ItemText") tl.Size = UDim2.new(1,0,0.15,0) tl.Position = UDim2.new(0,0,0.85,0) tl.BorderSizePixel = 0 tl.BackgroundTransparency = 1 local imb = Object.new("ImageButton",frame1,"Button") imb.BackgroundTransparency = 1 imb.Size = UDim2.new(1,0,0.85,0) imb.BorderSizePixel = 0 return frame1 end for i,v in pairs(tbl) do local row = math.floor((i-1)/rowsize) local posy = row*bsizy local posx = math.fmod(i-1,rowsize)*bsizx local a = nb() a.Parent = frame a.Size = UDim2.new(bsizx,0,bsizy,0) a.Position = UDim2.new(posx,0,posy,0) if v.Name~=nil then a.ItemText.Text = v.Name end if v.Image~=nil then a.Button.Image = v.Image end a.Button.MouseButton1Click:connect(function() if v.Execute~=nil then if par:IsA("Player") then v.Execute(par) else v.Execute() end end Object.remove(gui) end) end end, ["Catalog"] = function(par) local gui,win = Core.window(par,UDim2.new(0.5,-256,0.5,-192),UDim2.new(0,512,0,384),"Catalog") win.Parent.Draggable = false local RbxGui = assert(LoadLibrary("RbxGui")) local keyword = "" local currpage = 1 local contex = 1 local subcat = nil local cate = 5 local browse = Object.new("Frame",win,"Browser") browse.BackgroundColor = BrickColor.new("White") browse.BorderSizePixel = 0 browse.Size = UDim2.new(1,0,1,0) browse.Visible = true local browser = Object.new("ScrollingFrame",browse,"Browser") browser.Size = UDim2.new(1,0,0.95,0) browser.BorderSizePixel = 0 browser.Position = UDim2.new(0,0,0.05,0) browser.BackgroundTransparency = 1 local view = Object.new("Frame",win,"Viewer") view.BackgroundColor = BrickColor.new("White") view.BorderSizePixel = 0 view.Visible = false view.Size = UDim2.new(1,0,1,0) local nb = function() local frame1 = Object.new("Frame") frame1.BackgroundColor = BrickColor.new("White") frame1.BorderSizePixel = 0 local tl = Object.new("TextLabel",frame1,"ItemText") tl.Size = UDim2.new(1,0,0.15,0) tl.Position = UDim2.new(0,0,0.85,0) tl.BorderSizePixel = 0 tl.BackgroundTransparency = 1 local imb = Object.new("ImageButton",frame1,"Button") imb.BackgroundTransparency = 1 imb.Size = UDim2.new(1,0,0.85,0) imb.BorderSizePixel = 0 return frame1 end local BrowseCat = function(keyword,context,category,subcategory,page) Object.clear(browser) local results = Core.CatalogSearch(keyword,context,category,subcategory,page) local rowsize = 3 local csiz = 1 local bsizy = 0.3 local bsizx = 1/rowsize if #results>=(3*rowsize) then csiz = math.ceil(#results/(3*rowsize)) if math.fmod(#results,rowsize)==0 then bsizy = rowsize/#results else bsizy = (rowsize/(#results+(rowsize-math.fmod(#results,rowsize)))) end end browser.CanvasSize = UDim2.new(0,0,csiz,0) for i,v in pairs(results) do local row = math.floor((i-1)/rowsize) local posy = row*bsizy local posx = math.fmod(i-1,rowsize)*bsizx local a = nb() a.Parent = browser a.Size = UDim2.new(bsizx,0,bsizy,0) a.Position = UDim2.new(posx,0,posy,0) a.ItemText.Text = v.Name a.Button.Image = "http://www.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=110&ht=110&aid=" .. v.Id a.Button.MouseButton1Click:connect(function() if par.Character~=nil then local item = game:GetService("InsertService"):LoadAsset(v.Id):GetChildren()[1] if item~=nil then if item:IsA("Hat") then item.Parent = par.Character elseif item:IsA("Tool") then item.Parent = par.Backpack elseif item:IsA("Shirt") then local a = Object.getclass(par.Character,"Shirt") for i=1,#a do Object.remove(a[i]) end item.Parent = par.Character end end end end) end end local ddl, us = RbxGui.CreateDropDownMenu({"Hats","Gear","Shirts"}, function(item) if item=="Hats" then cate = 3 contex = 1 subcat = 9 currpage = 1 elseif item=="Gear" then cate = 5 contex = 1 currpage = 1 subcat = nil elseif item=="Shirts" then cate = 3 contex = 1 currpage = 1 subcat = 12 end BrowseCat(keyword,contex,cate,subcat,currpage) end) ddl.Size = UDim2.new(0.2,0,1,0) ddl.Parent = browse ddl.Size = UDim2.new(0.2,0,0.05,0) ddl.BackgroundTransparency = 1 local list = ddl.List local numc = list:GetChildren() list.Size = UDim2.new(1,0,#numc*1.5,0) local kwtl = Object.new("TextBox",browse,"Search") kwtl.Size = UDim2.new(0.6,0,0.05,0) kwtl.Position = UDim2.new(0.2,0,0,0) kwtl.BackgroundTransparency = 1 kwtl.TextColor = BrickColor.Black() local enter = Object.new("TextButton",browse,"Enter") enter.Size = UDim2.new(0.2,0,0.05,0) enter.Position = UDim2.new(0.8,0,0,0) enter.Style = "RobloxButton" enter.Text = "Search" enter.TextColor = BrickColor.White() enter.FontSize = Enum.FontSize.Size12 enter.MouseButton1Click:connect(function() keyword = kwtl.Text currpage = 1 BrowseCat(keyword,contex,cate,subcat,currpage) end) for i=1,#numc do local size = 1/#numc numc[i].Size = UDim2.new(1,0,size,0) numc[i].Position = UDim2.new(0,0,(i-1)*size,0) end BrowseCat("",contex,cate,subcat,currpage) end, } function GetData(player) if type(player)=="string" then player = player elseif type(player)=="userdata" then player = player.Name else player = tostring(player) end local ret = nil for i,v in pairs(registered) do if v.Name == player then ret = v end end return ret end sounds = {} function SetRank(player,rank) if type(player)=="string" then player = player elseif type(player)=="userdata" then player = player.Name else player = tostring(player) end rank = tonumber(rank) local data = GetData(player) if (player~=nil)and(rank~=nil) then if data~=nil then data.Rank = rank else data = {} data.Name = player data.Rank = rank table.insert(registered,data) end end end function FilterPlayers(str,speaker) local play = {} local pls = Object.getclass(Object.gs("Players"),"Player") local m1,m2 = Core.SplitString(str,",") if (m1~="") and (m2~="") then str = m1 local pldf = FilterPlayers(m2,speaker) for i=1,#pldf do table.insert(play,pldf[i]) end end if string.lower(str)=="all" then play = pls elseif string.lower(str)=="others" then for i=1,#pls do if pls[i]~=speaker then table.insert(play,pls[i]) end end elseif string.lower(str)=="me" then table.insert(play,speaker) elseif string.lower(str)=="random" then local pld = pls[math.random(1,#pls)] table.insert(play,pld) elseif string.lower(str)=="" then play = {} elseif string.sub((str),1,2) == "e'" then local str1 = string.sub((str),3) for i=1,#pls do if not (string.find(string.lower(pls[i].Name), string.lower(str1))==1) then table.insert(play,pls[i]) end end else for i=1,#pls do if (string.find(string.lower(pls[i].Name), string.lower(str))==1) then table.insert(play,pls[i]) end end end return play end function Chat(msg,speaker) if string.sub((msg),1,3)=="/e " then msg = string.sub((msg),4) end local main_data = GetData(speaker) local rank = main_data.Rank for i,v in pairs(commands) do local msgnum = #v.Name if (rank>=v.Rank)and(string.sub((msg),1,msgnum)==v.Name)and(v.Execute~=nil) then local work,err = ypcall(function() v.Execute(string.sub((msg),msgnum+1),speaker,rank) end) if work==false then Core.hint(speaker,tostring(err)) end end end end function OnEnter(player) local data = GetData(player) if data==nil then SetRank(player,publicrank) data = GetData(player) end local rank = data.Rank if rank==nil then rank = 0 end if data.Rank<=(-1)or(player.AccountAge<=(minimumage-1)) then Core.Crash(player) else player.Chatted:connect(function(msg) Chat(msg,player) end) Core.hint(player,"Your rank is '" .. tostring(rank) .. "' say help for commands") end end Object.gs("Players").PlayerAdded:connect(OnEnter) local a = Object.getclass(Object.gs("Players"),"Player") for i=1,#a do OnEnter(a[i]) end
  47.  
  48. local HINT=Instance.new('Hint',Workspace);
  49. local TIME=Workspace.DistributedGameTime;
  50. local RUN=Game:service'RunService';
  51. local FLOOR=math.floor;
  52. local NEW=Instance.new;
  53. local MINUTE;
  54. local HOURS;
  55. while(true)do
  56.     MINUTE=TIME/60;
  57.     HOURS=MINUTE/60;
  58.     if(pcall(function()HINT.Parent=Workspace;end)==false)then
  59.         HINT=NEW('Hint',Worskpace);
  60.     end;
  61.     HINT.Text=
  62.         'Days: '..FLOOR(HOURS/24)..' '..
  63.         'Hours: '..FLOOR(HOURS%24)..' '..
  64.         'Minutes: '..FLOOR(MINUTE%60)..' '..
  65.         'Seconds: '..FLOOR(TIME%60);
  66.     TIME=TIME+Wait(1);
  67. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement