Advertisement
ANXIETY4741

Tiny Tanks Script/Gui

Apr 6th, 2020
6,216
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 29.64 KB | None | 0 0
  1. --[[
  2.     By: 0110100001110100011101000111000001110011001110100010111100101111001100010110010001110010011101100010111001101101011100110010111101110100001011110111001100100001010000010110100101010000011001010110111001010000011110000110100101100110011011100110100000111000011010000110111101100100011110010111001101101000001100000100001101100101011001100100001001100111011011000100010101110110010101100111010101010001001111110110010100111101001101010110011101101000011101110100011001000101
  3. ]]
  4.  
  5. local breakWhile1 = Instance.new("BoolValue")
  6. breakWhile1.Value = true
  7. local breakWhile2 = Instance.new("BoolValue")
  8. breakWhile2.Value = true
  9. local breakWhile3 = Instance.new("BoolValue")
  10. breakWhile3.Value = true
  11. local breakWhile4 = Instance.new("BoolValue")
  12. breakWhile4.Value = true
  13. local breakWhile5 = Instance.new("BoolValue")
  14. breakWhile5.Value = true
  15. local breakWhile6 = Instance.new("BoolValue")
  16. breakWhile6.Value = true
  17. local breakWhile7 = Instance.new("BoolValue")
  18. breakWhile7.Value = true
  19. local breakWhile8 = Instance.new("BoolValue")
  20. breakWhile8.Value = true
  21. local breakWhile9 = Instance.new("BoolValue")
  22. breakWhile9.Value = true
  23. local breakWhile10 = Instance.new("BoolValue")
  24. breakWhile10.Value = true
  25. local breakWhile11 = Instance.new("BoolValue")
  26. breakWhile11.Value = true
  27. local breakWhile12 = Instance.new("BoolValue")
  28. breakWhile12.Value = true
  29. local breakWhile13 = Instance.new("BoolValue")
  30. breakWhile13.Value = true
  31. local breakWhile14 = Instance.new("BoolValue")
  32. breakWhile14.Value = true
  33. function CreateFrame(Transparency, Color)
  34.     local Frame = Instance.new("Frame")
  35.     Frame.BorderSizePixel = 0
  36.     Frame.BackgroundTransparency = Transparency
  37.     Frame.BackgroundColor3 = Color
  38.     return Frame
  39. end
  40. function CreateTextLabel (Text, TextColor)
  41.     local TxtLbl = Instance.new("TextLabel")
  42.     TxtLbl.Font = Enum.Font.SourceSansBold
  43.     TxtLbl.BackgroundTransparency = 1
  44.     TxtLbl.TextColor3 = TextColor
  45.     TxtLbl.Text = Text
  46.     TxtLbl.TextSize = 15
  47.     return TxtLbl
  48. end
  49. function CreateTextBox (Text, TextColor)
  50.     local TxtLbl = Instance.new("TextBox")
  51.     TxtLbl.BackgroundTransparency = 1
  52.     TxtLbl.TextColor3 = TextColor
  53.     TxtLbl.Text = Text
  54.     TxtLbl.TextSize = 15
  55.     return TxtLbl
  56. end
  57. function CreateTextButton (Text, TextColor)
  58.     local TxtLbl = Instance.new("TextButton")
  59.     TxtLbl.BackgroundTransparency = 1
  60.     TxtLbl.TextColor3 = TextColor
  61.     TxtLbl.Text = Text
  62.     TxtLbl.TextSize = 15
  63.     return TxtLbl
  64. end
  65. local function SendNotification (TextY)
  66.     game.StarterGui:SetCore("SendNotification", {Title = "OPTanks666", Text = TextY})
  67. end
  68. local function FF()
  69.     while breakWhile1.Value == false do
  70.         for i, v in pairs(game.Players:GetPlayers()) do
  71.             if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name) then
  72.                 if v.TeamColor == game.Players.LocalPlayer.TeamColor then
  73.                     local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name)
  74.                     local A_1 = Tank
  75.                     local A_2 = "Absorb"
  76.                     local A_3 = Tank.Base.Position
  77.                     local A_4 = Vector3.new(Tank.Base.Position.X-70,Tank.Base.Position.Y,Tank.Base.Position.Z-70)
  78.                     local Event = game:GetService("ReplicatedStorage").Remotes.FireAbility
  79.                     Event:FireServer(A_1,A_2,A_3,A_4)
  80.                 end
  81.             end
  82.         end
  83.         wait(.01)
  84.     end
  85. end
  86. local function AntiBulletOT()
  87.     while breakWhile6.Value == false do
  88.         for i, v in pairs(game.Players:GetPlayers()) do
  89.             if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name) then
  90.                 if v.TeamColor ~= game.Players.LocalPlayer.TeamColor then
  91.                     local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name)
  92.                     local A_1 = Tank
  93.                     local A_2 = "Absorb"
  94.                     local A_3 = Tank.Base.Position
  95.                     local A_4 = Vector3.new(Tank.Base.Position.X-7,Tank.Base.Position.Y,Tank.Base.Position.Z-10)
  96.                     local Event = game:GetService("ReplicatedStorage").Remotes.FireAbility
  97.                     Event:FireServer(A_1,A_2,A_3,A_4)
  98.                     local CR = coroutine.wrap(function()
  99.                         local ammos = Tank.AvailableAmmo:GetChildren()
  100.                         for i =1, #ammos do
  101.                             wait(0.01)
  102.                             ammos[i].Value = math.huge
  103.                         end
  104.                     end)
  105.                 CR()
  106.                 end
  107.             end
  108.         end
  109.         wait(.01)
  110.     end
  111. end
  112. local function EMP()
  113.     while breakWhile2.Value == false do
  114.         for i, v in pairs(game.Players:GetPlayers()) do
  115.             if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name) then
  116.                 if v.TeamColor == game.Players.LocalPlayer.TeamColor then
  117.                     local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name)
  118.                     local A_1 = Tank
  119.                     local A_2 = "EMP"
  120.                     local A_3 = Tank.Base.Position
  121.                     local A_4 = Vector3.new(Tank.Base.Position.X-7,Tank.Base.Position.Y,Tank.Base.Position.Z-10)
  122.                     local Event = game:GetService("ReplicatedStorage").Remotes.FireAbility
  123.                     Event:FireServer(A_1,A_2,A_3,A_4)
  124.                 end
  125.             end
  126.         end
  127.         wait(.01)
  128.     end
  129. end
  130. local function EMPOP()
  131.     while breakWhile4.Value == false do
  132.         for i, v in pairs(game.Players:GetPlayers()) do
  133.             if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name) then
  134.                 if v.TeamColor ~= game.Players.LocalPlayer.TeamColor then
  135.                     local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name)
  136.                     local A_1 = Tank
  137.                     local A_2 = "EMP"
  138.                     local A_3 = Tank.Base.Position
  139.                     local A_4 = Vector3.new(Tank.Base.Position.X-7,Tank.Base.Position.Y,Tank.Base.Position.Z-10)
  140.                     local Event = game:GetService("ReplicatedStorage").Remotes.FireAbility
  141.                     Event:FireServer(A_1,A_2,A_3,A_4)
  142.                 end
  143.             end
  144.         end
  145.         wait(.01)
  146.     end
  147. end
  148. local function Mine()
  149.     while breakWhile3.Value == false do
  150.         for i, v in pairs(game.Players:GetPlayers()) do
  151.             if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name) then
  152.                 if v.TeamColor == game.Players.LocalPlayer.TeamColor then
  153.                     local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name)
  154.                     local A_1 = Tank
  155.                     local A_2 = "Mine"
  156.                     local A_3 = Tank.Base.Position
  157.                     local A_4 = Vector3.new(Tank.Base.Position.X-7,Tank.Base.Position.Y,Tank.Base.Position.Z-10)
  158.                     local Event = game:GetService("ReplicatedStorage").Remotes.FireAbility
  159.                     Event:FireServer(A_1,A_2,A_3,A_4)
  160.                 end
  161.             end
  162.         end
  163.         wait(.01)
  164.     end
  165. end
  166. local function MineOP()
  167.     while breakWhile5.Value == false do
  168.         for i, v in pairs(game.Players:GetPlayers()) do
  169.             if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name) then
  170.                 if v.TeamColor ~= game.Players.LocalPlayer.TeamColor then
  171.                     local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..v.Name)
  172.                     local A_1 = Tank
  173.                     local A_2 = "Mine"
  174.                     local A_3 = Tank.Base.Position
  175.                     local A_4 = Vector3.new(Tank.Base.Position.X-7,Tank.Base.Position.Y,Tank.Base.Position.Z-10)
  176.                     local Event = game:GetService("ReplicatedStorage").Remotes.FireAbility
  177.                     Event:FireServer(A_1,A_2,A_3,A_4)
  178.                 end
  179.             end
  180.         end
  181.         wait(.01)
  182.     end
  183. end
  184. local function MakeDeadOnTouch(DoorClone)
  185.     DoorClone.Touched:Connect(function(part)
  186.         print(part.Parent.Name)
  187.         DoorClone.CanCollide = true
  188.         if string.sub(part.Parent.Name, 1, 5) == "Tank-" then
  189.             if game.Players:FindFirstChild(string.sub(part.Parent.Name, 6)) then
  190.                 local plrwhotouched = game.Players:FindFirstChild(string.sub(part.Parent.Name, 6))
  191.                     if  plrwhotouched.TeamColor ~= game.Players.LocalPlayer.TeamColor then
  192.                         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..plrwhotouched.Name)
  193.                         local A_1 = Tank
  194.                         local A_2 = "Mine"
  195.                         local A_3 = part.Position
  196.                         local A_4 = Vector3.new(part.Position.X-7,part.Position.Y,part.Position.Z-10)
  197.                         local Event = game:GetService("ReplicatedStorage").Remotes.FireAbility
  198.                         Event:FireServer(A_1,A_2,A_3,A_4)
  199.                     end
  200.                 end
  201.             end                
  202.     end)
  203.     while breakWhile7 == false and game:GetService("ReplicatedStorage").GamemodeInfo.Active.Value == true do
  204.         for i, v in pairs(DoorClone:GetTouchingParts()) do
  205.             print(v.Name)
  206.             local part = v
  207.             if string.sub(part.Parent.Name, 1, 5) == "Tank-" then
  208.             if game.Players:FindFirstChild(string.sub(part.Parent.Name, 6)) then
  209.                 local plrwhotouched = game.Players:FindFirstChild(string.sub(part.Parent.Name, 6))
  210.                     if  plrwhotouched.TeamColor ~= game.Players.LocalPlayer.TeamColor then
  211.                         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..plrwhotouched.Name)
  212.                         local A_1 = Tank
  213.                         local A_2 = "Mine"
  214.                         local A_3 = part.Position
  215.                         local A_4 = Vector3.new(part.Position.X-7,part.Position.Y,part.Position.Z-10)
  216.                         local Event = game:GetService("ReplicatedStorage").Remotes.FireAbility
  217.                         Event:FireServer(A_1,A_2,A_3,A_4)
  218.                     end
  219.                 end
  220.             end
  221.         end
  222.         wait(.1)
  223.     end
  224. end
  225. local function InfiniteAmmo ()
  226.     while breakWhile9.Value == false do
  227.         if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  228.             local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  229.             local ammos = Tank.AvailableAmmo:GetChildren()
  230.             for i =1, #ammos do
  231.                 wait(0.1)
  232.                 ammos[i].Value = 999999
  233.             end
  234.         end
  235.         wait(.1)
  236.     end
  237.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  238.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  239.         local ammos = Tank.AvailableAmmo:GetChildren()
  240.         for i =1, #ammos do
  241.             wait(0.1)
  242.             ammos[i].Value = 25
  243.         end
  244.     end
  245. end
  246. local function InfiniteRotate ()
  247.     local OldRotationValue = 180
  248.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  249.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  250.         OldRotationValue = Tank.Settings.RotationSpeed.Value
  251.     end
  252.     while breakWhile10.Value == false do
  253.         if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  254.             local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  255.             Tank.Settings.RotationSpeed.Value = 90000
  256.         end
  257.         wait(.1)
  258.     end
  259.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  260.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  261.         Tank.Settings.RotationSpeed.Value = OldRotationValue
  262.     end
  263. end
  264. local function FasterTank ()
  265.     local OldMoveValue = 25
  266.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  267.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  268.         OldMoveValue = Tank.Settings.MoveSpeed.Value
  269.     end
  270.     while breakWhile11.Value == false do
  271.         if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  272.             local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  273.             Tank.Settings.MoveSpeed.Value = 100
  274.         end
  275.         wait(.1)
  276.     end
  277.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  278.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  279.         Tank.Settings.MoveSpeed.Value = OldMoveValue
  280.     end
  281. end
  282. local function InfShots ()
  283.     local OldShots = 4
  284.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  285.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  286.         OldShots = Tank.Settings.LoadedShots.Value
  287.     end
  288.     while breakWhile12.Value == false do
  289.         if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  290.             local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  291.             Tank.Settings.LoadedShots.Value = 400000
  292.         end
  293.         wait(.1)
  294.     end
  295.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  296.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  297.         Tank.Settings.LoadedShots.Value = OldShots
  298.     end
  299. end
  300. local function InfFire ()
  301.     local OldFire = 1
  302.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  303.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  304.         OldFire = Tank.Settings.MaxFireRate.Value
  305.     end
  306.     while breakWhile13.Value == false do
  307.         if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  308.             local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  309.             Tank.Settings.MaxFireRate.Value = 0.01
  310.         end
  311.         wait(.1)
  312.     end
  313.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  314.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  315.         Tank.Settings.MaxFireRate.Value = OldFire
  316.     end
  317. end
  318. local function NoAbilityCooldown ()
  319.     local OldAbilityCooldown = 20
  320.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  321.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  322.         OldAbilityCooldown = Tank.Settings.AbilityCooldown.Value
  323.     end
  324.     while breakWhile14.Value == false do
  325.         if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  326.             local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  327.             Tank.Settings.AbilityCooldown.Value = 0.1
  328.         end
  329.         wait(.1)
  330.     end
  331.     if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  332.         local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  333.         Tank.Settings.AbilityCooldown.Value = OldAbilityCooldown
  334.     end
  335. end
  336. local function AllowInSpawn ()
  337.     while breakWhile8.Value == false do
  338.         if game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name) then
  339.             local Tank = game:GetService("Workspace").Tanks:FindFirstChild("Tank-"..game.Players.LocalPlayer.Name)
  340.             Tank.Settings.AllowedInSpawn.Value = true
  341.         end
  342.         wait(.1)
  343.     end
  344. end
  345.  
  346. function KillOnLeave ()
  347.     while breakWhile7.Value == false do
  348.         if game.Workspace:FindFirstChild("ToyMap") then
  349.             if game.Workspace:FindFirstChild("ToyMap"):IsA("Model") then
  350.                
  351.                 if game.Workspace:FindFirstChild("ToyMap"):FindFirstChild("TeamDoors") then
  352.                     local OppositeTeam = ""
  353.                     if string.lower(game.Players.LocalPlayer.Team.Name) == "blue" then
  354.                         OppositeTeam = "Red"
  355.                     else
  356.                         OppositeTeam = "Blue"
  357.                     end
  358.                     if game.Workspace:FindFirstChildWhichIsA("Model"):FindFirstChild("TeamDoors"):FindFirstChild(OppositeTeam) then
  359.                         local Folder = Instance.new("Folder", game.Workspace)
  360.                         Folder.Name = "DoorClones"
  361.                         for i, h in pairs(game.Workspace:FindFirstChild("ToyMap"):FindFirstChild("TeamDoors"):FindFirstChild(OppositeTeam):GetChildren()) do
  362.                             local DoorClone = h:Clone()
  363.                             DoorClone.Parent = Folder
  364.                             DoorClone.Name = "DoorClone"
  365.                             MakeDeadOnTouch(DoorClone)
  366.                         end
  367.                     end
  368.                 end
  369.             end
  370.         end
  371.         repeat wait() until game:GetService("ReplicatedStorage").GamemodeInfo.Active.Value == false or breakWhile7.Value == true
  372.         if game:GetService("ReplicatedStorage").GamemodeInfo.Active.Value == false then
  373.             repeat wait() until game:GetService("ReplicatedStorage").GamemodeInfo.Active.Value == true or breakWhile7.Value == true
  374.         end
  375.         if game.Workspace:FindFirstChild("DoorClones") then
  376.             game.Workspace:FindFirstChild("DoorClones"):Destroy()
  377.         end
  378.     end
  379. end
  380. function Toggle(Type)
  381.     if Type == "FF" then
  382.         if breakWhile1.Value == true then
  383.             breakWhile1.Value = false
  384.             SendNotification("Turned On ForceField/Pulse For Your Team")
  385.             FF()
  386.         else
  387.             breakWhile1.Value = true
  388.             SendNotification("Turned Off ForceField/Pulse For Your Team")
  389.         end
  390.     elseif Type == "EMP" then
  391.         if breakWhile2.Value == true then
  392.             breakWhile2.Value = false
  393.             SendNotification("Turned On EMP For Your Team")
  394.             EMP()
  395.         else
  396.             breakWhile2.Value = true
  397.             SendNotification("Turned Off EMP For Your Team")
  398.         end
  399.     elseif Type == "Mines" then
  400.         if breakWhile3.Value == true then
  401.             breakWhile3.Value = false
  402.             SendNotification("Turned On Mines For Your Team")
  403.             Mine()
  404.         else
  405.             breakWhile3.Value = true
  406.             SendNotification("Turned Off Mines For Your Team")
  407.         end
  408.     elseif Type == "EMPOT" then
  409.         if breakWhile4.Value == true then
  410.             breakWhile4.Value = false
  411.             SendNotification("Turned On EMP For The Other Team")
  412.             EMPOP()
  413.         else
  414.             breakWhile4.Value = true
  415.             SendNotification("Turned Off EMP For The Other Team")
  416.         end
  417.     elseif Type == "MinesOT" then
  418.         if breakWhile5.Value == true then
  419.             breakWhile5.Value = false
  420.             SendNotification("Turned On Mines For The Other Team")
  421.             MineOP()
  422.         else
  423.             breakWhile5.Value = true
  424.             SendNotification("Turned Off Mines For The Other Team")
  425.         end
  426.     elseif Type == "AntiLeave" then
  427.         if breakWhile7.Value == true then
  428.             breakWhile7.Value = false
  429.             SendNotification("Turned On AntiLeave For The Other Team")
  430.             KillOnLeave()
  431.         else
  432.             breakWhile7.Value = true
  433.             SendNotification("Turned Off AntiLeave For The Other Team")
  434.         end
  435.     elseif Type == "AllowInSpawn" then
  436.         if breakWhile8.Value == true then
  437.             breakWhile8.Value = false
  438.             SendNotification("Turned On Allow In Spawn For You")
  439.             AllowInSpawn()
  440.         else
  441.             breakWhile8.Value = true
  442.             SendNotification("Turned Off Allow In Spawn For You")
  443.         end
  444.     elseif Type == "InfRotate" then
  445.         if breakWhile10.Value == true then
  446.             breakWhile10.Value = false
  447.             SendNotification("Turned On Inf Rotate Speed For You")
  448.             InfiniteRotate()
  449.         else
  450.             breakWhile10.Value = true
  451.             SendNotification("Turned Off Inf Rotate Speed For You")
  452.         end
  453.     elseif Type == "InfAmmo" then
  454.         if breakWhile9.Value == true then
  455.             breakWhile9.Value = false
  456.             SendNotification("Turned On Inf Ammo For You")
  457.             InfiniteAmmo()
  458.         else
  459.             breakWhile9.Value = true
  460.             SendNotification("Turned Off Inf Ammo For You")
  461.         end
  462.     elseif Type == "FasterTank" then
  463.         if breakWhile11.Value == true then
  464.             breakWhile11.Value = false
  465.             SendNotification("Turned On Faster Tank For You")
  466.             FasterTank()
  467.         else
  468.             breakWhile11.Value = true
  469.             SendNotification("Turned Off Faster Tank For You")
  470.         end
  471.     elseif Type == "NoReload" then
  472.         if breakWhile12.Value == true then
  473.             breakWhile12.Value = false
  474.             SendNotification("Turned On No Reload For You")
  475.             InfShots()
  476.         else
  477.             breakWhile12.Value = true
  478.             SendNotification("Turned Off No Reload For You")
  479.         end
  480.     elseif Type == "InfFire" then
  481.         if breakWhile13.Value == true then
  482.             breakWhile13.Value = false
  483.             SendNotification("Turned On Infinite Fire For You")
  484.             InfFire()
  485.         else
  486.             breakWhile13.Value = true
  487.             SendNotification("Turned Off Infinite For You")
  488.         end
  489.     elseif Type == "AbilityCooldown" then
  490.         if breakWhile14.Value == true then
  491.             breakWhile14.Value = false
  492.             SendNotification("Turned On No Ability Cooldown For You")
  493.             NoAbilityCooldown()
  494.         else
  495.             breakWhile14.Value = true
  496.             SendNotification("Turned Off No Ability Cooldown For You")
  497.         end
  498.     end
  499.    
  500. end
  501. -- In order to use the InputBegan event, the UserInputService service must be used
  502. local UserInputService = game:GetService("UserInputService")
  503.  
  504. local ContextActionService = game:GetService("ContextActionService")
  505.  
  506. -- Setting up the action handling function
  507. local function handleActionZ(actionName, inputState, inputObj)
  508.     if inputState == Enum.UserInputState.Begin then
  509.     Toggle("FF")
  510.     end
  511. end
  512. local function handleActionX(actionName, inputState, inputObj)
  513.     if inputState == Enum.UserInputState.Begin then
  514.     Toggle("EMP")
  515.     end
  516. end
  517. local function handleActionC(actionName, inputState, inputObj)
  518.     if inputState == Enum.UserInputState.Begin then
  519.     Toggle("Mines")
  520.     end
  521. end
  522.  
  523. local function handleActionV(actionName, inputState, inputObj)
  524.     if inputState == Enum.UserInputState.Begin then
  525.     Toggle("EMPOT")
  526.     end
  527. end
  528. local function handleActionB(actionName, inputState, inputObj)
  529.     if inputState == Enum.UserInputState.Begin then
  530.         Toggle("MinesOT")
  531.     end
  532. end
  533. local function handleActionN(actionName, inputState, inputObj)
  534.     if inputState == Enum.UserInputState.Begin then
  535.         Toggle("AntiLeave")
  536.     end
  537. end
  538. local function handleActionF(actionName, inputState, inputObj)
  539.     if inputState == Enum.UserInputState.Begin then
  540.         Toggle("AllowInSpawn")
  541.     end
  542. end
  543. local function handleActionG(actionName, inputState, inputObj)
  544.     if inputState == Enum.UserInputState.Begin then
  545.         Toggle("InfAmmo")
  546.     end
  547. end
  548. local function handleActionH(actionName, inputState, inputObj)
  549.     if inputState == Enum.UserInputState.Begin then
  550.         Toggle("InfRotate")
  551.     end
  552. end
  553. local function handleActionJ(actionName, inputState, inputObj)
  554.     if inputState == Enum.UserInputState.Begin then
  555.         Toggle("FasterTank")
  556.     end
  557. end
  558. local function handleActionK(actionName, inputState, inputObj)
  559.     if inputState == Enum.UserInputState.Begin then
  560.         Toggle("NoReload")
  561.     end
  562. end
  563. local function handleActionL(actionName, inputState, inputObj)
  564.     if inputState == Enum.UserInputState.Begin then
  565.         Toggle("InfFire")
  566.     end
  567. end
  568. local function handleActionSC(actionName, inputState, inputObj)
  569.     if inputState == Enum.UserInputState.Begin then
  570.         Toggle("AbilityCooldown")
  571.     end
  572. end
  573. if game.CoreGui:FindFirstChild("KeyBindGui") then
  574.     game.CoreGui:FindFirstChild("KeyBindGui"):Destroy()
  575. end
  576. local HintGui = Instance.new("ScreenGui",game.CoreGui)
  577. HintGui.ResetOnSpawn = false
  578. HintGui.Name = "KeyBindGui"
  579. local MainFrame = CreateFrame(1,Color3.fromRGB(0,0,0))
  580. MainFrame.Size = UDim2.new(.5,-430,0,0)
  581. MainFrame.AnchorPoint = Vector2.new(.5,1)
  582. MainFrame.Position = UDim2.new(.5,430,1,-5)
  583. MainFrame.Parent = HintGui
  584. local KeysToBind = {
  585.     You = {
  586.         {"F", "Allow In Spawn",function() Toggle("AllowInSpawn") end, breakWhile8},
  587.         {"G", "Inf Ammo",function() Toggle("InfAmmo") end, breakWhile9},
  588.         {"H", "Inf Rotate",function() Toggle("InfRotate") end, breakWhile10},
  589.         {"J", "Faster Tank",function() Toggle("FasterTank") end, breakWhile11},
  590.         {"K", "No Reload",function() Toggle("NoReload") end, breakWhile12},
  591.         {"L", "InfFire",function() Toggle("InfFire") end, breakWhile13},
  592.         {";", "No Ability Cooldown",function() Toggle("AbilityCooldown") end, breakWhile14},
  593.     }, 
  594.     YourTeam = {
  595.         {"Z", "ForceField",function() Toggle("FF") end, breakWhile1},
  596.         {"X", "EMP",function() Toggle("EMP") end, breakWhile2},
  597.         {"C", "Mines",function() Toggle("Mines") end,breakWhile3},
  598.     },
  599.     OtherTeam = {
  600.         {"V", "EMP",function() Toggle("EMPOT") end,breakWhile4},
  601.         {"B", "Mines",function() Toggle("MinesOT") end, breakWhile5},
  602.         --{"N", "Anti-Leave",function() Toggle("AntiLeave") end, breakWhile7}  
  603.     }
  604. }
  605. function GetTotalFuncs ()
  606.     local num = 0
  607.     num = num + #KeysToBind.YourTeam+#KeysToBind.OtherTeam
  608.     return num
  609. end
  610. local YourTeam = CreateFrame(.5,Color3.fromRGB(0,0,0))
  611. YourTeam.Position = UDim2.new(0,0,0,0)
  612. YourTeam.Size = UDim2.new(0,0,0,50)
  613. YourTeam.Parent = MainFrame
  614. local XPOS1 = 0
  615. for i, v in pairs(KeysToBind.YourTeam) do
  616.     local KeyFrame = CreateFrame(1, Color3.fromRGB(0,255,0))
  617.     KeyFrame.Size = UDim2.new(0,50,0,50)
  618.     KeyFrame.Position = UDim2.new(0,XPOS1,0,0)
  619.     KeyFrame.Parent = YourTeam
  620.     local KeyLabel = CreateTextLabel(v[1],Color3.fromRGB(255,255,255))
  621.     KeyLabel.Size = UDim2.new(1,0,1,0)
  622.     KeyLabel.TextSize = 40
  623.     KeyLabel.Parent = KeyFrame
  624.     local KeyDesc = CreateTextLabel(v[2],Color3.fromRGB(255,255,255))
  625.     KeyDesc.Size = UDim2.new(1,0,1,0)
  626.     KeyDesc.TextSize = 10
  627.     KeyDesc.TextYAlignment = Enum.TextYAlignment.Bottom
  628.     KeyDesc.Parent = KeyFrame
  629.     XPOS1 = XPOS1 + 53
  630.     local Button = CreateTextButton("",Color3.fromRGB(0,0,0))
  631.     Button.BackgroundTransparency = 1
  632.     Button.Size = UDim2.new(1,0,1,0)
  633.     Button.ZIndex = 2
  634.     Button.MouseButton1Click:Connect(v[3])
  635.     Button.Parent = KeyFrame
  636.     v[4].Changed:Connect(function()
  637.         if v[4].Value == false then
  638.             KeyFrame.BackgroundTransparency = .5
  639.         else
  640.             KeyFrame.BackgroundTransparency = 1
  641.         end
  642.     end)
  643. end
  644. YourTeam.Size = UDim2.new(0,XPOS1,0,50)
  645. local XPOS2 = 0
  646. local OtherTeam = CreateFrame(.5,Color3.fromRGB(0,0,0))
  647. OtherTeam.Size = UDim2.new(0,0,0,50)
  648. OtherTeam.Position = UDim2.new(0,0,0,YourTeam.Position.Y.Offset+YourTeam.Size.Y.Offset+25)
  649. OtherTeam.AnchorPoint = Vector2.new(0,0)
  650. OtherTeam.Parent = MainFrame
  651. for i, v in pairs(KeysToBind.OtherTeam) do
  652.     local KeyFrame = CreateFrame(1, Color3.fromRGB(255,0,0))
  653.     KeyFrame.Size = UDim2.new(0,50,0,50)
  654.     KeyFrame.Position = UDim2.new(0,XPOS2,0,0)
  655.     KeyFrame.Parent = OtherTeam
  656.     local KeyLabel = CreateTextLabel(v[1],Color3.fromRGB(255,255,255))
  657.     KeyLabel.Size = UDim2.new(1,0,1,0)
  658.     KeyLabel.TextSize = 40
  659.     KeyLabel.Parent = KeyFrame
  660.     local KeyDesc = CreateTextLabel(v[2],Color3.fromRGB(255,255,255))
  661.     KeyDesc.Size = UDim2.new(1,0,1,0)
  662.     KeyDesc.TextSize = 10
  663.     KeyDesc.TextYAlignment = Enum.TextYAlignment.Bottom
  664.     KeyDesc.Parent = KeyFrame
  665.     XPOS2 = XPOS2 + 53
  666.     local Button = CreateTextButton("",Color3.fromRGB(0,0,0))
  667.     Button.BackgroundTransparency = 1
  668.     Button.Size = UDim2.new(1,0,1,0)
  669.     Button.ZIndex = 2
  670.     Button.MouseButton1Click:Connect(v[3])
  671.     Button.Parent = KeyFrame
  672.     v[4].Changed:Connect(function()
  673.         if v[4].Value == false then
  674.             KeyFrame.BackgroundTransparency = .5
  675.         else
  676.             KeyFrame.BackgroundTransparency = 1
  677.         end
  678.     end)
  679. end
  680. XPOS2 = XPOS2 - 2
  681. OtherTeam.Size = UDim2.new(0,XPOS2,0,50)
  682. local YourTeamLabel = CreateTextLabel("Your Team",Color3.fromRGB(255,255,255))
  683. YourTeamLabel.BackgroundColor3 = Color3.fromRGB(0,0,0)
  684. YourTeamLabel.BackgroundTransparency = .5
  685. YourTeamLabel.TextSize = 15
  686. YourTeamLabel.Size = UDim2.new(0,80,0,15)
  687. YourTeamLabel.Position = UDim2.new(0,0,0,-17)
  688. YourTeamLabel.Parent = YourTeam
  689. local OtherTeamLabel = CreateTextLabel("Other Team",Color3.fromRGB(255,255,255))
  690. local YouFrame = CreateFrame(.5,Color3.fromRGB(0,0,0))
  691. YouFrame.Size = UDim2.new(0,0,0,50)
  692. YouFrame.Parent = MainFrame
  693. local XPOS0 = 0
  694. for i, v in pairs(KeysToBind.You) do
  695.     local KeyFrame = CreateFrame(1, Color3.fromRGB(0,0,255))
  696.     KeyFrame.Size = UDim2.new(0,50,0,50)
  697.     KeyFrame.Position = UDim2.new(0,XPOS0,0,0)
  698.     KeyFrame.Parent = YouFrame
  699.     local KeyLabel = CreateTextLabel(v[1],Color3.fromRGB(255,255,255))
  700.     KeyLabel.Size = UDim2.new(1,0,1,0)
  701.     KeyLabel.TextSize = 40
  702.     KeyLabel.Parent = KeyFrame
  703.     local KeyDesc = CreateTextLabel(v[2],Color3.fromRGB(255,255,255))
  704.     KeyDesc.Size = UDim2.new(1,0,1,0)
  705.     KeyDesc.TextSize = 10
  706.     KeyDesc.TextYAlignment = Enum.TextYAlignment.Bottom
  707.     KeyDesc.Parent = KeyFrame
  708.     XPOS0 = XPOS0 + 53
  709.     local Button = CreateTextButton("",Color3.fromRGB(0,0,0))
  710.     Button.BackgroundTransparency = 1
  711.     Button.Size = UDim2.new(1,0,1,0)
  712.     Button.ZIndex = 2
  713.     Button.MouseButton1Click:Connect(v[3])
  714.     Button.Parent = KeyFrame
  715.     v[4].Changed:Connect(function()
  716.         if v[4].Value == false then
  717.             KeyFrame.BackgroundTransparency = .5
  718.         else
  719.             KeyFrame.BackgroundTransparency = 1
  720.         end
  721.     end)
  722. end
  723. YouFrame.Size = UDim2.new(0,XPOS0,0,50)
  724. YouFrame.Position = UDim2.new(0,0,0,OtherTeam.Position.Y.Offset+OtherTeam.Size.Y.Offset+25)
  725. local YouFrameLabel = CreateTextLabel("You",Color3.fromRGB(255,255,255))
  726. YouFrameLabel.BackgroundColor3 = Color3.fromRGB(0,0,0)
  727. YouFrameLabel.BackgroundTransparency = .5
  728. YouFrameLabel.TextSize = 15
  729. YouFrameLabel.Size = UDim2.new(0,80,0,15)
  730. YouFrameLabel.Position = UDim2.new(0,0,0,-17)
  731. YouFrameLabel.Parent = YouFrame
  732. OtherTeamLabel.BackgroundColor3 = Color3.fromRGB(0,0,0)
  733. OtherTeamLabel.BackgroundTransparency = .5
  734. OtherTeamLabel.TextSize = 15
  735. OtherTeamLabel.Position = UDim2.new(0,0,0,-17)
  736. OtherTeamLabel.Parent = OtherTeam
  737. OtherTeamLabel.Size = UDim2.new(0,OtherTeamLabel.TextBounds.X+5,0,15)
  738. YourTeamLabel.Size = UDim2.new(0,YourTeamLabel.TextBounds.X+5,0,15)
  739. YouFrameLabel.Size = UDim2.new(0,YouFrameLabel.TextBounds.X+5,0,15)
  740. MainFrame.Size = UDim2.new(.5, -370, 0, 200)
  741. -- Bind the action to the handler
  742. ContextActionService:BindAction("BoundAction1", handleActionZ, false, Enum.KeyCode.Z)
  743. ContextActionService:BindAction("BoundAction2", handleActionX, false, Enum.KeyCode.X)
  744. ContextActionService:BindAction("BoundAction3", handleActionC, false, Enum.KeyCode.C)
  745. ContextActionService:BindAction("BoundAction4", handleActionV, false, Enum.KeyCode.V)
  746. ContextActionService:BindAction("BoundAction5", handleActionB, false, Enum.KeyCode.B)
  747. --ContextActionService:BindAction("BoundAction7", handleActionN, false, Enum.KeyCode.N)
  748. ContextActionService:BindAction("BoundAction8", handleActionF, false, Enum.KeyCode.F)
  749. ContextActionService:BindAction("BoundAction9", handleActionG, false, Enum.KeyCode.G)
  750. ContextActionService:BindAction("BoundAction10", handleActionH, false, Enum.KeyCode.H)
  751. ContextActionService:BindAction("BoundAction11", handleActionJ, false, Enum.KeyCode.J)
  752. ContextActionService:BindAction("BoundAction12", handleActionK, false, Enum.KeyCode.K)
  753. ContextActionService:BindAction("BoundAction13", handleActionL, false, Enum.KeyCode.L)
  754. ContextActionService:BindAction("BoundAction14", handleActionSC, false, Enum.KeyCode.Semicolon)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement