c00lkiddv2016

GUI

May 28th, 2016
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.51 KB | None | 0 0
  1. --[[Mediafire]]
  2. local ref = {}
  3. ref[1] = Instance.new("ScreenGui")
  4. ref[1].Name = "GuiControl"
  5.     ref[2] = Instance.new("Frame")
  6.     ref[2].Size = UDim2.new(0, 210, 0, 180)
  7.     ref[2].Style = Enum.FrameStyle.RobloxRound
  8.     ref[2].Name = "Main"
  9.     ref[2].Position = UDim2.new(1, -35, 0.5, -90)
  10.     ref[2].Parent = ref[1]
  11.         ref[3] = Instance.new("Frame")
  12.         ref[3].Size = UDim2.new(0, 150, 0, 30)
  13.         ref[3].Style = Enum.FrameStyle.RobloxRound
  14.         ref[3].Name = "PlayerDropDown"
  15.         ref[3].Position = UDim2.new(0.5, -65, 0, 20)
  16.         ref[3].BackgroundTransparency = 1
  17.         ref[3].Parent = ref[2]
  18.         ref[4] = Instance.new("Frame")
  19.         ref[4].Size = UDim2.new(0, 150, 0, 30)
  20.         ref[4].Style = Enum.FrameStyle.RobloxRound
  21.         ref[4].Name = "CommandDropDown"
  22.         ref[4].Position = UDim2.new(0.5, -65, 0, 60)
  23.         ref[4].BackgroundTransparency = 1
  24.         ref[4].Parent = ref[2]
  25.         ref[5] = Instance.new("TextButton")
  26.         ref[5].FontSize = Enum.FontSize.Size14
  27.         ref[5].Name = "Execute"
  28.         ref[5].Text = "Execute"
  29.         ref[5].Size = UDim2.new(0, 160, 0, 50)
  30.         ref[5].TextColor3 = Color3.new(1, 1, 1)
  31.         ref[5].Style = Enum.ButtonStyle.RobloxButton
  32.         ref[5].Position = UDim2.new(0.5, -70, 0, 100)
  33.         ref[5].Parent = ref[2]
  34.         ref[6] = Instance.new("TextButton")
  35.         ref[6].FontSize = Enum.FontSize.Size18
  36.         ref[6].Name = "Toggle"
  37.         ref[6].Text = "<"
  38.         ref[6].Size = UDim2.new(0, 20, 1, 0)
  39.         ref[6].TextColor3 = Color3.new(1, 1, 1)
  40.         ref[6].Font = Enum.Font.ArialBold
  41.         ref[6].Style = Enum.ButtonStyle.RobloxButton
  42.         ref[6].Parent = ref[2]
  43.     ref[7] = Instance.new("Frame")
  44.     ref[7].Visible = false
  45.     ref[7].Size = UDim2.new(0, 250, 0, 150)
  46.     ref[7].Style = Enum.FrameStyle.RobloxRound
  47.     ref[7].Name = "Input"
  48.     ref[7].Position = UDim2.new(0.5, -175, 0.5, -75)
  49.     ref[7].Parent = ref[1]
  50.         ref[8] = Instance.new("TextLabel")
  51.         ref[8].FontSize = Enum.FontSize.Size24
  52.         ref[8].Text = "..."
  53.         ref[8].Size = UDim2.new(1, 0, 0, 30)
  54.         ref[8].TextColor3 = Color3.new(1, 1, 1)
  55.         ref[8].Font = Enum.Font.ArialBold
  56.         ref[8].Name = "Title"
  57.         ref[8].BackgroundTransparency = 1
  58.         ref[8].Parent = ref[7]
  59.         ref[9] = Instance.new("TextLabel")
  60.         ref[9].FontSize = Enum.FontSize.Size18
  61.         ref[9].Text = "..."
  62.         ref[9].Size = UDim2.new(1, 0, 0, 30)
  63.         ref[9].TextColor3 = Color3.new(1, 1, 1)
  64.         ref[9].Font = Enum.Font.ArialBold
  65.         ref[9].Name = "Info"
  66.         ref[9].Position = UDim2.new(0, 0, 0, 30)
  67.         ref[9].BackgroundTransparency = 1
  68.         ref[9].Parent = ref[7]
  69.         ref[10] = Instance.new("Frame")
  70.         ref[10].Size = UDim2.new(1, 0, 0, 30)
  71.         ref[10].Style = Enum.FrameStyle.RobloxRound
  72.         ref[10].Name = "Input"
  73.         ref[10].Position = UDim2.new(0, 0, 0, 60)
  74.         ref[10].Parent = ref[7]
  75.             ref[11] = Instance.new("TextBox")
  76.             ref[11].FontSize = Enum.FontSize.Size14
  77.             ref[11].Text = "Input Here"
  78.             ref[11].Size = UDim2.new(1, 16, 1, 16)
  79.             ref[11].TextColor3 = Color3.new(1, 1, 1)
  80.             ref[11].BackgroundTransparency = 1
  81.             ref[11].Font = Enum.Font.Arial
  82.             ref[11].Name = "Input"
  83.             ref[11].Position = UDim2.new(0, -8, 0, -8)
  84.             ref[11].Parent = ref[10]
  85.         ref[12] = Instance.new("TextButton")
  86.         ref[12].FontSize = Enum.FontSize.Size12
  87.         ref[12].Name = "Confirm"
  88.         ref[12].Text = "Confirm"
  89.         ref[12].Size = UDim2.new(1, 0, 0, 30)
  90.         ref[12].TextColor3 = Color3.new(1, 1, 1)
  91.         ref[12].Style = Enum.ButtonStyle.RobloxButton
  92.         ref[12].Position = UDim2.new(0, 0, 0, 100)
  93.         ref[12].Parent = ref[7]
  94.  
  95. ref[1].Parent = game.CoreGui
  96.  
  97. Player = game.Players.LocalPlayer
  98. Main = ref[2]
  99. Input = ref[7]
  100.  
  101. local RbxGui = LoadLibrary("RbxGui")
  102.  
  103. function CreateDropDown(Items, Function)
  104. local DropDown = nil
  105. DropDown, UpdateDropDown = RbxGui.CreateDropDownMenu(Items, Function)
  106. DropDown.Size = UDim2.new(0,150,0,30)
  107. DropDown.Position = UDim2.new(0, 0, 0, 0)
  108. DropDown.Name = "DropDownMenu"
  109. return DropDown
  110. end
  111.  
  112. Main.PlayerDropDown.Style = "Custom"
  113. Main.CommandDropDown.Style = "Custom"
  114.  
  115. CPlayer = ""
  116. CFunction = ""
  117.  
  118. CPlayerDrop = nil
  119. PlayerList = {}
  120. NameList = {}
  121.  
  122. function UpdatePlayerDropDown()
  123. CPlayer = ""
  124. PlayerList = {}
  125. NameList = {}
  126. if CurDrop then CurDrop:Destroy() end
  127. PlayerList = game.Players:GetChildren()
  128. for Num, Obj in pairs(PlayerList) do
  129. table.insert(NameList, Obj.Name)
  130. end
  131. table.insert(NameList, "All")
  132. table.insert(NameList, "Other")
  133. Menu = CreateDropDown(NameList, function(Text) CPlayer = Text end)
  134. CPlayerDrop = Menu
  135. Menu.Name = "PlayerDropDown"
  136. Menu.Size = Main.PlayerDropDown.Size
  137. Menu.Parent = Main.PlayerDropDown
  138. end
  139.  
  140. UpdatePlayerDropDown()
  141.  
  142. game.Players.ChildAdded:connect(UpdatePlayerDropDown)
  143. game.Players.ChildRemoved:connect(UpdatePlayerDropDown)
  144.  
  145. Toggle = false
  146.  
  147. function Open()
  148. if Toggle then return end
  149. Toggle = true
  150. Main.Position = UDim2.new(1, -200, 0.5, -90)
  151. Main.Toggle.Text = ">"
  152. end
  153.  
  154. function Close()
  155. if not Toggle then return end
  156. Toggle = false
  157. Main.Position = UDim2.new(1, -35, 0.5, -90)
  158. Main.Toggle.Text = "<"
  159. end
  160.  
  161. function ToggleOpen()
  162. if not Toggle then
  163. Open()
  164. elseif Toggle then
  165. Close()
  166. end
  167. end
  168.  
  169. Main.Toggle.MouseButton1Click:connect(ToggleOpen)
  170.  
  171.  
  172. Commands = {}
  173.  
  174. function AddCommand(Name, Function)
  175. table.insert(Commands, {Name, Function})
  176. end
  177.  
  178. function LoadCommands()
  179. CFunction = ""
  180. CommandList = {}
  181. for Num, Obj in pairs(Commands) do
  182. table.insert(CommandList, Obj[1])
  183. end
  184. Menu = CreateDropDown(CommandList, function(Text) CFunction = Text end)
  185. CPlayerDrop = Menu
  186. Menu.Name = "CommandDropDown"
  187. Menu.Size = Main.CommandDropDown.Size
  188. Menu.Parent = Main.CommandDropDown
  189. end
  190.  
  191. function Execute()
  192. if CPlayer == "" or CFunction == "" then return end
  193. for Num, Obj in pairs(Commands) do
  194. if CFunction == Obj[1] then
  195. if CPlayer == "All" then
  196. for Number, Plyr in pairs(PlayerList) do
  197. Obj[2](Plyr)
  198. end
  199. elseif CPlayer == "Other" then
  200. for Number, Plyr in pairs(PlayerList) do
  201. if Plyr ~= Player then
  202. Obj[2](Plyr)
  203. end
  204. end
  205. else
  206. Obj[2](game.Players[CPlayer])
  207. end
  208. end
  209. end
  210. end
  211.  
  212. Main.Execute.MouseButton1Click:connect(Execute)
  213.  
  214. function RequestInput(Title, Info, Type, New)
  215. Main.Visible = false
  216. Input.Visible = true
  217. Input.Title.Text = Title
  218. Input.Info.Text = Info
  219. if Type == "String" or Type == "Text" then
  220. if New then
  221. Input.Input.Input.Text = "Input Here"
  222. end
  223. Input.Confirm.MouseButton1Click:wait()
  224. Input.Visible = false
  225. Main.Visible = true
  226. if Input.Input.Input.Text ~= "Input Here" then
  227. return Input.Input.Input.Text
  228. else
  229. return ""
  230. end
  231. elseif Type == "Player" then
  232. XPlayer = ""
  233. NList = {}
  234. PList = game.Players:GetChildren()
  235. for Num, Obj in pairs(PList) do
  236. table.insert(NList, Obj.Name)
  237. end
  238. Menu = CreateDropDown(NList, function(Text) XPlayer = Text end)
  239. Menu.Name = "PlayerDropDown"
  240. Menu.Size = Input.Input.Input.Size
  241. Menu.Position = Input.Input.Input.Position
  242. Menu.Parent = Input.Input
  243. Input.Confirm.MouseButton1Click:wait()
  244. Menu:Remove()
  245. Input.Visible = false
  246. Main.Visible = true
  247. if game.Players:findFirstChild(XPlayer) then
  248. return game.Players[XPlayer]
  249. else
  250. return nil
  251. end
  252. elseif Type == "Bool" then
  253. BoolCheck = "No"
  254. Menu = CreateDropDown({"Yes", "No"}, function(Text) BoolCheck = Text end)
  255. Menu.Name = "BoolDropDown"
  256. Menu.Size = Input.Input.Input.Size
  257. Menu.Position = Input.Input.Input.Position
  258. Menu.Parent = Input.Input
  259. Input.Confirm.MouseButton1Click:wait()
  260. Menu:Remove()
  261. Input.Visible = false
  262. Main.Visible = true
  263. if BoolCheck == "No" then
  264. return false
  265. elseif BoolCheck == "Yes" then
  266. return true
  267. end
  268. elseif type(Type) == type({}) then
  269. Current = Type[1]
  270. Menu = CreateDropDown(Type, function(Text) Current = Text end)
  271. Menu.Name = "TestDropDown"
  272. Menu.Size = Input.Input.Input.Size
  273. Menu.Position = Input.Input.Input.Position
  274. Menu.Parent = Input.Input
  275. Input.Confirm.MouseButton1Click:wait()
  276. Menu:Remove()
  277. Input.Visible = false
  278. Main.Visible = true
  279. return Current
  280. end
  281. end
  282.  
  283. ---------------------------------------------------------------
  284. ---------------------------------------------------------------
  285. ---------------------------------------------------------------
  286.  
  287. function Kill(P)
  288. if P.Character then
  289. P.Character:BreakJoints()
  290. end
  291. end
  292.  
  293. function TeleportToMe(P)
  294. if P ~= Player then
  295. if Player.Character and P.Character then
  296. P.Character.Torso.CFrame = Player.Character.Torso.CFrame * CFrame.new(0, 5, 0)
  297. elseif not Player.Character and P.Character then
  298. P.Character.Torso.CFrame = game.Workspace.CurrentCamera.Focus
  299. end
  300. end
  301. end
  302.  
  303. function TeleportPTo(P)
  304. P2 = RequestInput("Teleport", "Select Second Player", "Player", true)
  305. if P2 then
  306. if P2.Character and P.Character then
  307. P.Character.Torso.CFrame = P2.Character.Torso.CFrame * CFrame.new(0, 5, 0)
  308. elseif P2 == Player and P.Character and not Player.Character then
  309. P.Character.Torso.CFrame = game.Workspace.CurrentCamera.Focus
  310. end
  311. end
  312. end
  313.  
  314. function TeleportMeTo(P)
  315. if P ~= Player then
  316. if Player.Character and P.Character then
  317. Player.Character.Torso.CFrame = P.Character.Torso.CFrame * CFrame.new(0, 5, 0)
  318. elseif not Player.Character and P.Character then
  319. game.Workspace.CurrentCamera.Focus = P.Character.Torso.CFrame
  320. --game.Workspace.CurrentCamera.CoordinateFrame = P.Character.Torso.CFrame
  321. end
  322. end
  323. end
  324.  
  325. function Kick(P)
  326. P:Remove()
  327. end
  328.  
  329. function Freeze(P)
  330. if P.Character then
  331. P.Character.Head.Anchored = true
  332. end
  333. end
  334.  
  335. function Unfreeze(P)
  336. if P.Character then
  337. P.Character.Head.Anchored = false
  338. end
  339. end
  340.  
  341. function Reset(P)
  342. --P:LoadCharacter(true)
  343. M = Instance.new("Model")
  344. M.Name = P.Name
  345. P1 = Instance.new("Part")
  346. P1.Name = "Head"
  347. P1.Transparency = 1
  348. P1.Anchored = true
  349. P1.Parent = M
  350. P2 = Instance.new("Part")
  351. P2.Name = "Torso"
  352. P2.Transparency = 1
  353. P2.Anchored = true
  354. P2.Parent = M
  355. H = Instance.new("Humanoid")
  356. H.Parent = M
  357. H.Health = 0
  358. M.Parent = game.Workspace
  359. P.Character = M
  360. end
  361.  
  362. CurInhab = nil
  363. function Inhabit(P)
  364. if P.Character then
  365. if not CurInhab then
  366. Player.Character = P.Character
  367. CurInhab = P
  368. elseif CurInhab then
  369. OldInhab = CurInhab
  370. Player.Character = P.Character
  371. CurInhab = P
  372. Reset(OldInhab)
  373. end
  374. end
  375. end
  376.  
  377. function Blind(P)
  378. S = Instance.new("ScreenGui")
  379. S.Name = "BlindGui"
  380. S.Parent = P.PlayerGui
  381. F = Instance.new("Frame")
  382. F.Parent = S
  383. F.BorderColor3 = Color3.new(0, 0, 0)
  384. F.BackgroundColor3 = Color3.new(0, 0, 0)
  385. F.Size = UDim2.new(1, 0, 1, 0)
  386. F.Name = "Fade"
  387. F.ZIndex = 0
  388. end
  389.  
  390. function Unblind(P)
  391. if P.PlayerGui:findFirstChild("BlindGui") then
  392. P.PlayerGui.BlindGui:Remove()
  393. end
  394. end
  395.  
  396. function Hypno(P)
  397. S = Instance.new("ScreenGui")
  398. S.Name = "HypnoGui"
  399. S.Parent = P.PlayerGui
  400. F = Instance.new("Frame")
  401. F.Parent = S
  402. F.BorderColor3 = Color3.new(0, 0, 0)
  403. F.BackgroundColor3 = Color3.new(0, 0, 0)
  404. F.Size = UDim2.new(1, 0, 1, 0)
  405. F.Name = "Fade"
  406. F.ZIndex = 0
  407. Sc = Instance.new("LocalScript")
  408. Sc.Source = "\r\
  409.     F = script.Parent \r\
  410.     x=1 \r\
  411.     while true do \r\
  412.     wait() \r\
  413.     C = BrickColor.random() \r\
  414.     F.BackgroundColor3 = C.Color \r\
  415.     end \r\
  416.     "
  417. Sc.Parent = F
  418. end
  419.  
  420. function Dehypno(P)
  421. if P.PlayerGui:findFirstChild("HypnoGui") then
  422. P.PlayerGui.HypnoGui:Remove()
  423. end
  424. end
  425.  
  426. function FF(P)
  427. if P.Character then
  428. F = Instance.new("ForceField")
  429. F.Parent = P.Character
  430. end
  431. end
  432.  
  433. function DeFF(P)
  434. if P.Character then
  435. if P.Character:findFirstChild("ForceField") then
  436. P.Character.ForceField:Destroy()
  437. end
  438. end
  439. end
  440.  
  441. function Invisi(P)
  442. if P.Character then
  443. C = P.Character
  444. for Num, Obj in pairs(C:GetChildren()) do
  445. if Obj:IsA("BasePart") then
  446. Obj.Transparency = 1
  447. end
  448. end
  449. if C.Head:findFirstChild("face") then
  450. C.Head.face:Remove()
  451. end
  452. end
  453. end
  454.  
  455. function Visi(P)
  456. if P.Character then
  457. C = P.Character
  458. for Num, Obj in pairs(C:GetChildren()) do
  459. if Obj:IsA("BasePart") then
  460. Obj.Transparency = 0
  461. end
  462. end
  463. end
  464. end
  465.  
  466. function Whisper(P)
  467. Mess = RequestInput("Whisper Chat", "Type A Message To "..P.Name, "Text", true)
  468. if Mess ~= "" then
  469. game.Players:WhisperChat(Mess, P)
  470. end
  471. end
  472.  
  473. function DeHover(P)
  474. if P.Character then
  475. if P.Character.Torso:findFirstChild("BodyPosition") then
  476. P.Character.Torso.BodyPosition:Destroy()
  477. end
  478. end
  479. end
  480.  
  481. function Hover(P)
  482. Height = RequestInput("Hover Height", "Enter "..P.Name.."'s Height To Hover", "Text", false)
  483. if P.Character and tostring(tonumber(Height)) == Height then
  484. DeHover(P)
  485. B = Instance.new("BodyPosition")
  486. B.maxForce = Vector3.new(0, math.huge, 0)
  487. B.position = Vector3.new(0, tonumber(Height), 0)
  488. B.Parent = P.Character.Torso
  489. end
  490. end
  491.  
  492. function Walkspeed(P)
  493. Speed = RequestInput("Walkspeed", "Please Select "..P.Name.."'s Walkspeed", "Text", false)
  494. if P.Character and tostring(tonumber(Speed)) == Speed then
  495. P.Character.Humanoid.WalkSpeed = Speed
  496. end
  497. end
  498.  
  499. BanList = {}
  500. function Ban(P)
  501. Sure = RequestInput("Ban", "Are You Sure You Want To Ban "..P.Name.."?", "Bool", true)
  502. if Sure then
  503. table.insert(BanList, P.Name)
  504. P:Remove()
  505. end
  506. end
  507. game.Players.PlayerAdded:connect(function(Plyr)
  508. for Num, Obj in pairs(BanList) do
  509. if Obj == Plyr.Name then
  510. Plyr:Remove()
  511. end
  512. end
  513. end)
  514.  
  515. function Mute(P)
  516. P:SetSuperSafeChat(true)
  517. end
  518.  
  519. function Unmute(P)
  520. P:SetSuperSafeChat(false)
  521. end
  522.  
  523. function StatChange(P)
  524. if P:findFirstChild("leaderstats") then
  525. if #P.leaderstats:GetChildren() > 0 then
  526. Stats = {}
  527. for Num, Obj in pairs(P.leaderstats:GetChildren()) do
  528. table.insert(Stats, Obj.Name)
  529. end
  530. SelectStat = RequestInput("Stat Changer", "Select A Stat To Change", Stats, true)
  531. ValueStat = RequestInput("Stats Changer", "Enter A value for stat", "Text", true)
  532. if P.leaderstats:findFirstChild(SelectStat) then
  533. if tostring(tonumber(ValueStat)) == ValueStat then
  534. P.leaderstats[SelectStat].Value = tostring(ValueStat)
  535. end
  536. end
  537. end
  538. elseif P:findFirstChild("Stats") then
  539. if #P.Stats:GetChildren() > 0 then
  540. Stats = {}
  541. for Num, Obj in pairs(P.Stats:GetChildren()) do
  542. table.insert(Stats, Obj.Name)
  543. end
  544. SelectStat = RequestInput("Stat Changer", "Select A Stat To Change", Stats, true)
  545. ValueStat = RequestInput("Stats Changer", "Enter A value for stat", "Text", true)
  546. if P.Stats:findFirstChild(SelectStat) then
  547. if tostring(tonumber(ValueStat)) == ValueStat then
  548. P.Stats[SelectStat].Value = tostring(ValueStat)
  549. end
  550. end
  551. end
  552. end
  553. end
  554.  
  555. AddCommand("Kill", Kill)
  556. AddCommand("Tele Player", TeleportToMe)
  557. AddCommand("Tele Me", TeleportMeTo)
  558. AddCommand("P To P Tele", TeleportPTo)
  559. AddCommand("Kick", Kick)
  560. AddCommand("Ban", Ban)
  561. AddCommand("Freeze", Freeze)
  562. AddCommand("Unfreeze", Unfreeze)
  563. AddCommand("Inhabit", Inhabit)
  564. AddCommand("Reset", Reset)
  565. --[[AddCommand("Blind", Blind)
  566. AddCommand("Unblind", Unblind)
  567. AddCommand("Hypno", Hypno)
  568. AddCommand("De-hypno", Dehypno)]]
  569. AddCommand("ForceField", FF)
  570. AddCommand("De-ForceField", DeFF)
  571. AddCommand("Invisible", Invisi)
  572. AddCommand("Visible", Visi)
  573. AddCommand("Whisper", Whisper)
  574. AddCommand("Hover", Hover)
  575. AddCommand("De-Hover", DeHover)
  576. AddCommand("Walkspeed", Walkspeed)
  577. AddCommand("Mute", Mute)
  578. AddCommand("Unmute", Unmute)
  579. AddCommand("Change Stat", StatChange)
  580.  
  581. LoadCommands()
Add Comment
Please, Sign In to add comment