KienZino

DRAuto Train

Aug 15th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 7.54 KB | None | 0 0
  1. local DBRAutoTrain = Instance.new("ScreenGui")
  2. local Train = Instance.new("Frame")
  3. local Attack = Instance.new("TextButton")
  4. local Defense = Instance.new("TextButton")
  5. local Agility = Instance.new("TextButton")
  6. local Energy = Instance.new("TextButton")
  7. local Charge = Instance.new("TextButton")
  8. local OpenClose = Instance.new("TextButton")
  9. local Name = game.Players.LocalPlayer.Name
  10.  
  11. DBRAutoTrain.Name = "DBRAutoTrain"
  12. DBRAutoTrain.Parent = game.CoreGui
  13.  
  14. Train.Name = "Train"
  15. Train.Parent = DBRAutoTrain
  16. Train.BackgroundColor3 = Color3.new(0.631373, 0.631373, 0.631373)
  17. Train.BackgroundTransparency = 0.44999998807907
  18. Train.BorderSizePixel = 0
  19. Train.Position = UDim2.new(0.608576655, 0, 0.657250464, 0)
  20. Train.Visible = false
  21.  
  22. Attack.Name = "Attack"
  23. Attack.Parent = Train
  24. Attack.BackgroundColor3 = Color3.new(0, 0, 0)
  25. Attack.BackgroundTransparency = 0.30000001192093
  26. Attack.Position = UDim2.new(0.039, 0, 0.077, 0)
  27. Attack.Size = UDim2.new(0, 0, 0, 50)
  28. Attack.Text = "Attack"
  29. Attack.TextColor3 = Color3.new(1, 1, 1)
  30. Attack.TextSize = 0
  31. Attack.TextWrapped = true
  32.  
  33. Defense.Name = "Defense"
  34. Defense.Parent = Train
  35. Defense.BackgroundColor3 = Color3.new(0, 0, 0)
  36. Defense.BackgroundTransparency = 0.30000001192093
  37. Defense.Position = UDim2.new(0.567, 0, 0.077, 0)
  38. Defense.Size = UDim2.new(0, 0, 0, 50)
  39. Defense.Text = "Defense"
  40. Defense.TextColor3 = Color3.new(1, 1, 1)
  41. Defense.TextSize = 0
  42. Defense.TextWrapped = true
  43.  
  44. Agility.Name = "Agility"
  45. Agility.Parent = Train
  46. Agility.BackgroundColor3 = Color3.new(0, 0, 0)
  47. Agility.BackgroundTransparency = 0.30000001192093
  48. Agility.Position = UDim2.new(0.039, 0, 0.388, 0)
  49. Agility.Size = UDim2.new(0, 0, 0, 50)
  50. Agility.Text = "Agility"
  51. Agility.TextColor3 = Color3.new(1, 1, 1)
  52. Agility.TextSize = 0
  53. Agility.TextWrapped = true
  54.  
  55. Energy.Name = "Energy"
  56. Energy.Parent = Train
  57. Energy.BackgroundColor3 = Color3.new(0, 0, 0)
  58. Energy.BackgroundTransparency = 0.30000001192093
  59. Energy.Position = UDim2.new(0.567, 0, 0.385, 0)
  60. Energy.Size = UDim2.new(0, 0, 0, 50)
  61. Energy.Text = "Energy"
  62. Energy.TextColor3 = Color3.new(1, 1, 1)
  63. Energy.TextSize = 0
  64. Energy.TextWrapped = true
  65.  
  66. Charge.Name = "Charge"
  67. Charge.Parent = Train
  68. Charge.BackgroundColor3 = Color3.new(0, 0, 0)
  69. Charge.BackgroundTransparency = 0.30000001192093
  70. Charge.Position = UDim2.new(0.317, 0, 0.7, 0)
  71. Charge.Size = UDim2.new(0, 0, 0, 50)
  72. Charge.Text = "Charge"
  73. Charge.TextColor3 = Color3.new(1, 1, 1)
  74. Charge.TextSize = 0
  75. Charge.TextWrapped = true
  76.  
  77. OpenClose.Name = "OpenClose"
  78. OpenClose.Parent = DBRAutoTrain
  79. OpenClose.BackgroundColor3 = Color3.new(0, 0, 0)
  80. OpenClose.Position = UDim2.new(0.86815691, 0, 0.915254235, 0)
  81. OpenClose.Size = UDim2.new(0.118613139, 0, 0.0640301332, 0)
  82. OpenClose.Text = "Open"
  83. OpenClose.TextColor3 = Color3.new(1, 1, 1)
  84. OpenClose.TextScaled = true
  85. OpenClose.TextSize = 14
  86. OpenClose.TextWrapped = true
  87.  
  88. OpenClose.MouseButton1Click:connect(function()
  89.     if OpenClose.Text == "Close" then
  90.         OpenClose:TweenPosition(UDim2.new(0.868, 0, 0.915, 0), 'Out', 'Linear', 0.2)
  91.         Attack:TweenSize(UDim2.new(0, 0, 0, 50), 'Out', 'Linear', 0.1)
  92.         Defense:TweenSize(UDim2.new(0, 0, 0, 50), 'Out', 'Linear', 0.1)
  93.         Agility:TweenSize(UDim2.new(0, 0, 0, 50), 'Out', 'Linear', 0.1)
  94.         Energy:TweenSize(UDim2.new(0, 0, 0, 50), 'Out', 'Linear', 0.1)
  95.         Charge:TweenSize(UDim2.new(0, 0, 0, 50), 'Out', 'Linear', 0.1)
  96.         Attack.TextScaled = false
  97.         Attack.TextSize = 0
  98.         Defense.TextScaled = false
  99.         Defense.TextSize = 0
  100.         Agility.TextScaled = false
  101.         Agility.TextSize = 0
  102.         Energy.TextScaled = false
  103.         Energy.TextSize = 0
  104.         Charge.TextScaled = false
  105.         Charge.TextSize = 0
  106.         wait(0.2)
  107.         OpenClose.Text = "Open"
  108.         Train:TweenSizeAndPosition(UDim2.new(0, 0, 0, 0), UDim2.new(0.609, 0, 0.546, 0), 'Out', 'Linear', 0.25)
  109.         wait(0.1)
  110.         Train.Visible = false
  111.     else
  112.         Train.Visible = true
  113.         OpenClose:TweenPosition(UDim2.new(0.737, 0, 0.468, 0), 'Out', 'Linear', 0.2)
  114.         Train:TweenSizeAndPosition(UDim2.new(0.377, 0 , 0.424, 0), UDim2.new(0.609, 0, 0.546, 0), 'Out', 'Linear', 0.25)
  115.         wait(0.2)
  116.         Attack:TweenSize(UDim2.new(0, 166, 0, 50), 'Out', 'Linear', 0.2)
  117.         Defense:TweenSize(UDim2.new(0, 166, 0, 50), 'Out', 'Linear', 0.2)
  118.         Agility:TweenSize(UDim2.new(0, 166, 0, 50), 'Out', 'Linear', 0.2)
  119.         Energy:TweenSize(UDim2.new(0, 166, 0, 50), 'Out', 'Linear', 0.2)
  120.         Charge:TweenSize(UDim2.new(0, 166, 0, 50), 'Out', 'Linear', 0.2)
  121.         OpenClose.Text = "Close"
  122.         wait(0.2)
  123.         Attack.TextScaled = true
  124.         Defense.TextScaled = true
  125.         Agility.TextScaled = true
  126.         Energy.TextScaled = true
  127.         Charge.TextScaled = true
  128.     end
  129. end)
  130.  
  131. Attack.MouseButton1Click:connect(function()
  132.     if Attack.Text == "Attack" then
  133.         Attack.Text = "Stop Attack AutoTrain"
  134.         while Attack.Text == "Stop Attack AutoTrain" do
  135.             wait()
  136.             local remote = game["ReplicatedStorage"]["Remotes"]["Training"]["Combat"]
  137.             local args = {
  138.             [1] = {
  139.             LeftLowerArm = game["Workspace"][Name]["LeftLowerArm"],
  140.             RightUpperArm = game["Workspace"][Name]["RightUpperArm"],
  141.             LeftFoot = game["Workspace"][Name]["LeftFoot"],
  142.             RightHand = game["Workspace"][Name]["RightHand"],
  143.             RightLowerArm = game["Workspace"][Name]["RightLowerArm"],
  144.             LeftUpperLeg = game["Workspace"][Name]["LeftUpperLeg"],
  145.             LeftUpperArm = game["Workspace"][Name]["LeftUpperArm"],
  146.             Character = game["Workspace"][Name],
  147.             LeftHand = game["Workspace"][Name]["LeftHand"],
  148.             RightFoot = game["Workspace"][Name]["RightFoot"],
  149.             Humanoid = game["Workspace"][Name]["Humanoid"],
  150.             RightLowerLeg = game["Workspace"][Name]["RightLowerLeg"],
  151.             RightUpperLeg = game["Workspace"][Name]["RightUpperLeg"],
  152.             LeftLowerLeg = game["Workspace"][Name]["LeftLowerLeg"]
  153.             }
  154.             }
  155.             remote:InvokeServer(unpack(args))  
  156.         end
  157.     else
  158.         Attack.Text = "Attack"
  159.     end
  160. end)
  161.  
  162. Defense.MouseButton1Click:connect(function()
  163.     if Defense.Text == "Defense" then
  164.         Defense.Text = "Stop Defense AutoTrain" do
  165.             while Defense.Text == "Stop Defense AutoTrain" do
  166.                 local remote = game["ReplicatedStorage"]["Remotes"]["Training"]["Defense"]
  167.                 local args = {
  168.                     [1] = game["Players"][Name]["Stats"],
  169.                     [2] = game["Players"][Name]["Status"],
  170.                     [3] = game["Workspace"][Name]["Humanoid"],
  171.                     [4] = game["Workspace"][Name]["RightHand"]
  172.                 }
  173.                 remote:InvokeServer(unpack(args))
  174.             end
  175.         end
  176.     else
  177.         Defense.Text = "Defense"
  178.     end
  179. end)
  180.  
  181. Agility.MouseButton1Click:connect(function()
  182.     if Agility.Text == "Agility" then
  183.         Agility.Text = "Stop Agility AutoTrain" do
  184.             while Agility.Text == "Stop Agility AutoTrain" do
  185.                 wait()
  186.                 game.ReplicatedStorage.Remotes.Training.Agility:FireServer(game.Players.Name.Stats)
  187.             end
  188.         end
  189.     else
  190.         Agility.Text = "Agility"
  191.     end
  192. end)
  193.  
  194. Energy.MouseButton1Click:connect(function()
  195.     if Energy.Text == "Energy" then
  196.         Energy.Text = "Stop Energy AutoTrain" do
  197.             while Energy.Text == "Stop Energy AutoTrain" do
  198.                 wait(0.1)
  199.                 local remote = game["ReplicatedStorage"]["Remotes"]["Actions"]["EnergyBlast"]
  200.                 local args = {
  201.                  [1] = "Left"
  202.                 }
  203.                 remote:InvokeServer(unpack(args))
  204.             end
  205.         end
  206.     else
  207.         Energy.Text = "Energy"
  208.     end
  209. end)
  210.  
  211. Charge.MouseButton1Click:connect(function()
  212.     if Charge.Text == "Charge" then
  213.         Charge.Text = "Stop Charging"
  214.         local remote = Game["ReplicatedStorage"]["Remotes"]["Training"]["Charge"]
  215.         local args = {
  216.         [1] = Game["Players"][Name]["Status"],
  217.         [2] = Game["Workspace"][Name]["UpperTorso"],
  218.         [3] = Game["Workspace"][Name]["Humanoid"]
  219.     }
  220.         remote:InvokeServer(unpack(args))
  221.     else
  222.         local remote = Game["ReplicatedStorage"]["Remotes"]["Training"]["ChargeFinish"]
  223.         local args = {}
  224.         remote:FireServer(unpack(args))
  225.         Charge.Text = "Charge"
  226.     end
  227. end)
Add Comment
Please, Sign In to add comment