iceeeeeaa

asdsafd

Jan 7th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.77 KB | None | 0 0
  1. t={} -- topkeklib,,,,,,, too lazy for list generation and shit
  2. t.gui={}
  3. t.objects={}
  4. t.pm={}
  5. t.runstate=false
  6. t.player=game.Players.LocalPlayer
  7. f={}
  8. f.gui=game:GetObjects("rbxassetid://380300885")[1]
  9. f.m=f.gui.main
  10. f.m.Visible=false
  11. f.m.Size=UDim2.new(0,280,0,290)
  12. f.top=f.m.top
  13. f.pb=f.m.doplayers
  14. f.bs=f.m.base
  15. f.ex=f.top.exit
  16. f.op=f.gui.open
  17. f.pl={}
  18.  
  19. f.bs.CanvasSize=UDim2.new(0,0,0,0)
  20.  
  21. f.op.MouseButton1Down:connect(function()
  22. if f.m.Visible==true then
  23. f.op.Visible=true
  24. f.m.Visible=false
  25. end
  26. if f.m.Visible==false then
  27. f.op.Visible=false
  28. f.m.Visible=true
  29. end
  30. end)
  31.  
  32. f.ex.MouseButton1Down:connect(function()
  33. f.m.Visible=false
  34. f.op.Visible=true
  35. end)
  36.  
  37. game:GetService("ContextActionService"):BindAction("pbar",
  38. (function() f.pb:CaptureFocus() end), false, Enum.KeyCode.Equals)
  39.  
  40. function t.pm.doplayers(func)
  41. for i,v in pairs(f.pl) do
  42. func(v)
  43. end
  44. end
  45.  
  46. function t.objects:SpawnState(state)
  47. t.runstate = true;
  48. spawn(function()
  49. repeat
  50. ypcall(function()
  51. wait(0)
  52. t.player.Character.Humanoid:ChangeState(state)
  53. end)
  54. until t.runstate == false
  55. end)
  56. end
  57.  
  58. function t.objects:FELoop(func)
  59. t.runstate = true;
  60. spawn(function()
  61. repeat
  62. ypcall(function()
  63. wait(0)
  64. func()
  65. end)
  66. until t.runstate == false
  67. end)
  68. end
  69.  
  70. function t.objects:GetPlayersFromString(str)
  71. if str == "all" then
  72. return game.Players:GetPlayers()
  73. end
  74. if str == "me" then
  75. return {game.Players.LocalPlayer}
  76. end
  77. if str == "others" then
  78. local cm = {}
  79. for i, v in pairs(game.Players:GetPlayers()) do
  80. if v ~= game.Players.LocalPlayer then
  81. table.insert(cm, v)
  82. end
  83. end
  84. return cm
  85. end
  86. local pn = str:gmatch("([^,]+)")
  87. local pl = {}
  88. for ln in pn do
  89. for i, v in pairs(game.Players:GetPlayers()) do
  90. local nm = (v.Name):lower()
  91. if string.sub(nm,1,#ln)==(ln):lower() then
  92. table.insert(pl, v)
  93. end
  94. end
  95. end
  96. return pl
  97. end
  98.  
  99. function t.objects:CreateObject(details)
  100. local _ = Instance.new(details.Class);
  101. for i, v in pairs(details) do
  102. pcall(function()
  103. if i ~= "Class" then
  104. _[i] = v
  105. end
  106. end)
  107. end
  108. return _
  109. end
  110.  
  111. function t.objects:SetProperties(object, details)
  112. for i, v in pairs(details) do
  113. pcall(function()
  114. object[i] = v
  115. end)
  116. end
  117. end
  118.  
  119.  
  120.  
  121.  
  122. function t.gui.FindListRow(n, a)
  123. if n == 0 then n = 1 end
  124. if math.fmod(n, a) == 0 then
  125. n = n - 1
  126. end
  127. return math.floor(n / a)
  128. end
  129.  
  130.  
  131.  
  132. function t.gui:GenerateButtonList(base, list, specifications, custom, leavex)
  133. if custom == nil then
  134. BaseButton = t.objects:CreateObject {
  135. Class = "TextButton",
  136. BackgroundColor3 = specifications.BackgroundColor,
  137. BackgroundTransparency = specifications.BackgroundTransparency,
  138. BorderSizePixel = 0,
  139. FontSize = specifications.FontSize,
  140. Size = UDim2.new(
  141. (1/(specifications.NumberPerRow)),
  142. -(specifications.ButtonSeperation) - specifications.BorderDistance,
  143. 0, specifications.ButtonHeight
  144. )
  145. }
  146. else
  147. BaseButton = custom
  148. end
  149. for i, v in pairs(list) do
  150. local Virti = i
  151. local Virto = (function(n) if n < 0 then return 0 end return n end)(Virti - 1)
  152. Virto = Virto + t.gui.FindListRow(Virti, specifications.NumberPerRow)
  153. local BClone = BaseButton:Clone()
  154. if leavex == true then
  155. t.objects:SetProperties(BClone, {
  156. Parent = base,
  157. Text = v.Text,
  158. Position = UDim2.new(
  159. BaseButton.Position.X.Scale,
  160. BaseButton.Position.X.Offset,
  161. 0, ((specifications.ButtonSeperation + specifications.ButtonHeight) * t.gui.FindListRow(Virti, specifications.NumberPerRow)) + (specifications.BorderDistance/2)
  162. )
  163. })
  164. else
  165. t.objects:SetProperties(BClone, {
  166. Parent = base,
  167. Text = v.Text,
  168. Position = UDim2.new(
  169. (1/(specifications.NumberPerRow)) * math.fmod(Virto, specifications.NumberPerRow + 1),
  170. specifications.ButtonSeperation + (specifications.BorderDistance/2),
  171. 0, ((specifications.ButtonSeperation + specifications.ButtonHeight) * t.gui.FindListRow(Virti, specifications.NumberPerRow)) + (specifications.BorderDistance/2)
  172. ) --[[ that was a doozy]]
  173. })
  174. end
  175. BClone.MouseButton1Down:connect(function()
  176. v.func()
  177. end)
  178. end
  179. if base:IsA("ScrollingFrame") then
  180. base.BorderSizePixel = 0
  181. base.ScrollBarThickness = 6
  182. --base.CanvasSize = UDim2.new(0, 0, 0, math.ceil(#list / specifications.NumberPerRow)*(specifications.ButtonHeight+specifications.ButtonSeperation) + 15)
  183. end
  184. end
  185.  
  186. f.pb.FocusLost:connect(function(e)
  187. if e==true then
  188. f.pl=t.objects:GetPlayersFromString(f.pb.Text);f.pb.Text="";print('NL:::',#f.pl)
  189. end
  190. end)
  191.  
  192. state = function(s) t.objects:SpawnState(s) end
  193.  
  194. t.gui:GenerateButtonList(f.bs,
  195. {
  196. {Text = "God", func = (function()
  197. t.objects:FELoop(function()
  198. t.player.Character.Humanoid.MaxHealth = 999999
  199. t.player.Character.Humanoid.Health = 100
  200. end)
  201. end)},
  202. {Text = "Speed", func = (function()
  203. t.objects:FELoop(function()
  204. t.player.Character.Humanoid.WalkSpeed = 30
  205. end)
  206. end)},
  207. {Text = "Shutdown [PATCHED]", func = (function()
  208. t.objects:FELoop(function()
  209. for i=1,3000 do
  210. game.RobloxReplicatedStorage.NewFollower:FireServer("a") --[[thanks unreal]]
  211. end
  212. end)
  213. end)},
  214. {Text = "LoopSit", func = (function()
  215. t.objects:FELoop(function()
  216. for i,v in pairs(game.Players:GetPlayers()) do
  217. if v.Character.Humanoid then
  218. v.Character.Humanoid.Sit = true
  219. end
  220. end
  221. end)
  222. end)},
  223. {Text = "LoopJump", func = (function()
  224. t.objects:FELoop(function()
  225. for i,v in pairs(game.Players:GetPlayers()) do
  226. if v.Character.Humanoid then
  227. v.Character.Humanoid.Jump = true
  228. end
  229. end
  230. end)
  231. end)},
  232. {Text = "StopAll", func = (function() t.runstate = false end)},
  233. {Text = "Highjump", func = (function()
  234. t.objects:FELoop(function()
  235. t.player.Character.Humanoid.JumpPower = 100
  236. end)
  237. end)},
  238. {Text = "KillPlayers", func = (function()
  239. t.pm.doplayers(function(p) -- using other page libs haahahahahahah such a rebel
  240. coroutine.wrap(function()
  241. local we = Instance.new("Weld", t.player.Character.Torso)
  242. we.Part0 = t.player.Character.Torso
  243. we.Part1 = p.Character.Torso
  244. we.C0 = t.player.Character.Torso.CFrame
  245. we.C1 = t.player.Character.Torso.CFrame * CFrame.new(0, -10000, 0)
  246. wait(0.5)
  247. we:Destroy()
  248. end)()
  249. end)
  250. end)},
  251. {Text = "BringPlayers", func = (function()
  252. t.pm.doplayers(function(p) -- using other page libs haahahahahahah such a rebel
  253. local we = Instance.new("Weld", t.player.Character.Torso)
  254. we.Part0 = t.player.Character.Torso
  255. we.Part1 = p.Character.Torso
  256. we.C0 = t.player.Character.Torso.CFrame
  257. we.C1 = t.player.Character.Torso.CFrame
  258. end)
  259. end)},
  260. {Text = "Annoy", func = (function()
  261. t.objects:FELoop(function()
  262. for i,v in pairs(game.Players:GetPlayers()) do
  263. if v.Character.Humanoid then
  264. v.Character.Humanoid.Jump = true
  265. v.Character.Humanoid.Sit = true
  266. end
  267. end
  268. end)
  269. end)},
  270. {Text = "NoFace", func = (function()
  271. spawn(function()
  272. t.player.Character.Head.face.Parent = nil
  273. end)
  274. end)},
  275. {Text = "Ragdoll (LP)", func = (function()
  276. t.player.Character.Humanoid.Parent = nil
  277. end)},
  278. {Text = "Levitate", func = (function() state(10) end)},
  279. {Text = "Glide", func = (function() state(12) end)},
  280. {Text = "Swim", func = (function() state(4) end)},
  281. {Text = "Glitchy", func = (function() state(2) end)},
  282. {Text = "NoClip", func = (function() state(11) end)},
  283. {Text = "Stickyplayers", func = (function()
  284. local lucky = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]
  285. t.objects:FELoop(function()
  286. for i,v in pairs(game.Players:GetPlayers()) do if v.Name ~= t.player.Name then
  287. local we = Instance.new("Weld", t.player.Character.Torso)
  288. we.Part0 = t.player.Character.Torso
  289. we.Part1 = v.Character.Torso
  290. we.C0 = t.player.Character.Torso.CFrame
  291. we.C1 = lucky.Character.Torso.CFrame
  292. end end
  293. end)
  294. end)},
  295.  
  296. },
  297. {
  298. NumberPerRow = 2,
  299. ButtonSeperation = 0,
  300. ButtonHeight = 25,
  301. BorderDistance = 10,
  302.  
  303. },
  304. t.objects:CreateObject {
  305. Class = "TextButton",
  306. BackgroundColor3 = Color3.new(56/255, 56/255, 56/255),
  307. BackgroundTransparency = 0.5,
  308. Size = UDim2.new(0.5, -10, 0, 25),
  309. Position = UDim2.new(0, 8, 0, 0),
  310. BorderSizePixel = 0,
  311. TextColor3 = Color3.new(1, 1, 1),
  312. FontSize = Enum.FontSize.Size14,
  313. Font = Enum.Font.SourceSans
  314. })
  315.  
  316. f.gui.Parent=game.CoreGui
Add Comment
Please, Sign In to add comment