Advertisement
Colol

Untitled

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