Advertisement
0lf3_

Wizard Tycoon - 2 Player (Script)

Dec 31st, 2021
2,012
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.07 KB | None | 0 0
  1. local wizardHax = Instance.new("ScreenGui")
  2. local main = Instance.new("Frame")
  3. local title = Instance.new("TextLabel")
  4. local healthButton = Instance.new("TextButton")
  5. local funcButton = Instance.new("TextButton")
  6. local closeButton = Instance.new("TextButton")
  7. local healthGUI = Instance.new("Frame")
  8. local healthTitle = Instance.new("TextLabel")
  9. local targetBox = Instance.new("TextBox")
  10. local negateButton = Instance.new("TextButton")
  11. local numBox = Instance.new("TextBox")
  12. local errorTitle = Instance.new("TextLabel")
  13. local infoTarget = Instance.new("TextLabel")
  14. local infoNum = Instance.new("TextLabel")
  15. local addButton = Instance.new("TextButton")
  16. local setButton = Instance.new("TextButton")
  17. local closeButton_2 = Instance.new("TextButton")
  18. local funcGUI = Instance.new("Frame")
  19. local TextLabel = Instance.new("TextLabel")
  20. local closeButton_3 = Instance.new("TextButton")
  21. local funcButton1 = Instance.new("TextButton")
  22. local funcButton3 = Instance.new("TextButton")
  23. local funcButton6 = Instance.new("TextButton")
  24. local funcButton4 = Instance.new("TextButton")
  25. local funcButton9 = Instance.new("TextButton")
  26. local funcButton7 = Instance.new("TextButton")
  27. local funcButton2 = Instance.new("TextButton")
  28. local funcButton5 = Instance.new("TextButton")
  29. local funcButton8 = Instance.new("TextButton")
  30. local openButton = Instance.new("Frame")
  31. local openButton_2 = Instance.new("TextButton")
  32. local autoBuyStuff = false -- auto buy stuff in your team
  33. local autoGetMoney = false -- auto get money
  34. local players = game.Players
  35. local LocalPlayer = players.LocalPlayer
  36.  
  37. --Properties:
  38.  
  39. wizardHax.Name = "wizardHax"
  40. wizardHax.Parent = game.CoreGui
  41. wizardHax.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  42.  
  43. main.Name = "main"
  44. main.Parent = wizardHax
  45. main.BackgroundColor3 = Color3.fromRGB(85, 255, 127)
  46. main.BorderColor3 = Color3.fromRGB(170, 170, 255)
  47. main.BorderSizePixel = 3
  48. main.Position = UDim2.new(0.37714687, 0, 0.535626471, 0)
  49. main.Size = UDim2.new(0, 347, 0, 163)
  50. main.Visible = false
  51. main.Draggable = true
  52. main.Active = true
  53.  
  54. title.Name = "title"
  55. title.Parent = main
  56. title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  57. title.BackgroundTransparency = 1.000
  58. title.BorderSizePixel = 0
  59. title.Position = UDim2.new(0.239193082, 0, 0.0552147254, 0)
  60. title.Size = UDim2.new(0, 180, 0, 45)
  61. title.Font = Enum.Font.Fantasy
  62. title.Text = "wizardHaxs"
  63. title.TextColor3 = Color3.fromRGB(0, 100, 147)
  64. title.TextScaled = true
  65. title.TextSize = 14.000
  66. title.TextWrapped = true
  67.  
  68. healthButton.Name = "healthButton"
  69. healthButton.Parent = main
  70. healthButton.BackgroundColor3 = Color3.fromRGB(255, 219, 11)
  71. healthButton.BorderColor3 = Color3.fromRGB(0, 170, 255)
  72. healthButton.Position = UDim2.new(0.0547550432, 0, 0.589695632, 0)
  73. healthButton.Size = UDim2.new(0, 130, 0, 41)
  74. healthButton.Font = Enum.Font.SourceSans
  75. healthButton.Text = "Health editor"
  76. healthButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  77. healthButton.TextSize = 14.000
  78. healthButton.MouseButton1Down:Connect(function()
  79. healthGUI.Visible = not healthGUI.Visible
  80. end)
  81.  
  82. funcButton.Name = "funcButton"
  83. funcButton.Parent = main
  84. funcButton.BackgroundColor3 = Color3.fromRGB(255, 219, 11)
  85. funcButton.BorderColor3 = Color3.fromRGB(0, 170, 255)
  86. funcButton.Position = UDim2.new(0.570605218, 0, 0.589695692, 0)
  87. funcButton.Size = UDim2.new(0, 130, 0, 41)
  88. funcButton.Font = Enum.Font.SourceSans
  89. funcButton.Text = "Functions"
  90. funcButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  91. funcButton.TextSize = 14.000
  92. funcButton.MouseButton1Down:Connect(function()
  93. funcGUI.Visible = not funcGUI.Visible
  94. end)
  95.  
  96. closeButton.Name = "closeButton"
  97. closeButton.Parent = main
  98. closeButton.BackgroundColor3 = Color3.fromRGB(0, 255, 127)
  99. closeButton.BorderColor3 = Color3.fromRGB(0, 255, 127)
  100. closeButton.Position = UDim2.new(0.864185095, 0, 0.023779586, 0)
  101. closeButton.Size = UDim2.new(0, 41, 0, 41)
  102. closeButton.Font = Enum.Font.SourceSans
  103. closeButton.Text = "X"
  104. closeButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  105. closeButton.TextScaled = true
  106. closeButton.TextSize = 14.000
  107. closeButton.TextWrapped = true
  108. closeButton.MouseButton1Down:Connect(function()
  109. main.Visible = not main.Visible
  110. openButton.Visible = not openButton.Visible
  111. end)
  112.  
  113. healthGUI.Name = "healthGUI"
  114. healthGUI.Parent = wizardHax
  115. healthGUI.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  116. healthGUI.Position = UDim2.new(0.144607827, 0, 0.175675675, 0)
  117. healthGUI.Size = UDim2.new(0, 502, 0, 234)
  118. healthGUI.Visible = false
  119. healthGUI.Draggable = true
  120. healthGUI.Active = true
  121.  
  122. healthTitle.Name = "healthTitle"
  123. healthTitle.Parent = healthGUI
  124. healthTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  125. healthTitle.BackgroundTransparency = 1.000
  126. healthTitle.BorderColor3 = Color3.fromRGB(255, 255, 127)
  127. healthTitle.Position = UDim2.new(-0.000687420368, 0, -0.00215985253, 0)
  128. healthTitle.Size = UDim2.new(0, 203, 0, 40)
  129. healthTitle.Font = Enum.Font.SourceSans
  130. healthTitle.Text = "Health editor"
  131. healthTitle.TextColor3 = Color3.fromRGB(108, 108, 108)
  132. healthTitle.TextScaled = true
  133. healthTitle.TextSize = 14.000
  134. healthTitle.TextWrapped = true
  135.  
  136. targetBox.Name = "targetBox"
  137. targetBox.Parent = healthGUI
  138. targetBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  139. targetBox.Position = UDim2.new(0.0586269498, 0, 0.235597119, 0)
  140. targetBox.Size = UDim2.new(0, 303, 0, 33)
  141. targetBox.Font = Enum.Font.SourceSans
  142. targetBox.PlaceholderText = "Targets"
  143. targetBox.Text = ""
  144. targetBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  145. targetBox.TextSize = 14.000
  146. targetBox.ClearTextOnFocus = false
  147.  
  148. negateButton.Name = "negateButton"
  149. negateButton.Parent = healthGUI
  150. negateButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  151. negateButton.Position = UDim2.new(0.419776827, 0, 0.745437801, 0)
  152. negateButton.Size = UDim2.new(0, 80, 0, 39)
  153. negateButton.Font = Enum.Font.SourceSans
  154. negateButton.Text = "Negate"
  155. negateButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  156. negateButton.TextScaled = true
  157. negateButton.TextSize = 14.000
  158. negateButton.TextWrapped = true
  159. negateButton.MouseButton1Down:Connect(function()
  160. if not tonumber(numBox.Text) then
  161. return
  162. end
  163. local targets = getSelector(targetBox.Text)
  164. for i,player in pairs(targets) do
  165. print(player.Name)
  166. local rb = player.Character.HumanoidRootPart
  167. local pos = rb.CFrame
  168. local vel = rb.Velocity
  169. shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,tonumber(numBox.Text))
  170. end
  171. end)
  172.  
  173. numBox.Name = "numBox"
  174. numBox.Parent = healthGUI
  175. numBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  176. numBox.Position = UDim2.new(0.706429899, 0, 0.235597134, 0)
  177. numBox.Size = UDim2.new(0, 114, 0, 33)
  178. numBox.Font = Enum.Font.SourceSans
  179. numBox.PlaceholderText = "Number"
  180. numBox.Text = ""
  181. numBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  182. numBox.TextSize = 14.000
  183. numBox.ClearTextOnFocus = false
  184.  
  185. errorTitle.Name = "errorTitle"
  186. errorTitle.Parent = healthGUI
  187. errorTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  188. errorTitle.BorderColor3 = Color3.fromRGB(77, 116, 116)
  189. errorTitle.Position = UDim2.new(0.219123438, 0, 0.487179488, 0)
  190. errorTitle.Size = UDim2.new(0, 270, 0, 37)
  191. errorTitle.Visible = false
  192. errorTitle.Font = Enum.Font.SourceSans
  193. errorTitle.Text = ""
  194. errorTitle.TextColor3 = Color3.fromRGB(255, 0, 0)
  195. errorTitle.TextSize = 14.000
  196. errorTitle.TextWrapped = true
  197.  
  198. infoTarget.Name = "infoTarget"
  199. infoTarget.Parent = healthGUI
  200. infoTarget.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  201. infoTarget.Position = UDim2.new(0.0231629014, 0, 0.423076928, 0)
  202. infoTarget.Size = UDim2.new(0, 84, 0, 68)
  203. infoTarget.Font = Enum.Font.SourceSans
  204. infoTarget.Text = "Put a comma after each name to add multiple targets"
  205. infoTarget.TextColor3 = Color3.fromRGB(0, 0, 0)
  206. infoTarget.TextSize = 14.000
  207. infoTarget.TextWrapped = true
  208.  
  209. infoNum.Name = "infoNum"
  210. infoNum.Parent = healthGUI
  211. infoNum.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  212. infoNum.Position = UDim2.new(0.784119129, 0, 0.427350432, 0)
  213. infoNum.Size = UDim2.new(0, 75, 0, 33)
  214. infoNum.Font = Enum.Font.SourceSans
  215. infoNum.Text = "Put inf to make infinite"
  216. infoNum.TextColor3 = Color3.fromRGB(0, 0, 0)
  217. infoNum.TextSize = 14.000
  218. infoNum.TextWrapped = true
  219.  
  220. addButton.Name = "addButton"
  221. addButton.Parent = healthGUI
  222. addButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  223. addButton.Position = UDim2.new(0.188701123, 0, 0.741164267, 0)
  224. addButton.Size = UDim2.new(0, 80, 0, 39)
  225. addButton.Font = Enum.Font.SourceSans
  226. addButton.Text = "Add"
  227. addButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  228. addButton.TextScaled = true
  229. addButton.TextSize = 14.000
  230. addButton.TextWrapped = true
  231. addButton.MouseButton1Down:Connect(function()
  232. if not tonumber(numBox.Text) then
  233. return
  234. end
  235. local targets = getSelector(targetBox.Text)
  236. for i,player in pairs(targets) do
  237. print(player.Name)
  238. local rb = player.Character.HumanoidRootPart
  239. local pos = rb.CFrame
  240. local vel = rb.Velocity
  241. shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,-tonumber(numBox.Text))
  242. end
  243. end)
  244.  
  245. setButton.Name = "setButton"
  246. setButton.Parent = healthGUI
  247. setButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  248. setButton.Position = UDim2.new(0.642884374, 0, 0.741164267, 0)
  249. setButton.Size = UDim2.new(0, 80, 0, 39)
  250. setButton.Font = Enum.Font.SourceSans
  251. setButton.Text = "Set"
  252. setButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  253. setButton.TextScaled = true
  254. setButton.TextSize = 14.000
  255. setButton.TextWrapped = true
  256. setButton.MouseButton1Down:Connect(function()
  257. if not tonumber(numBox.Text) then
  258. return
  259. end
  260. local targets = getSelector(targetBox.Text)
  261. for i,player in pairs(targets) do
  262. print(player.Name)
  263. local rb = player.Character.HumanoidRootPart
  264. local pos = rb.CFrame
  265. local vel = rb.Velocity
  266. shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,-tonumber(numBox.Text)+player.Character.Humanoid.Health)
  267. end
  268. end)
  269.  
  270. closeButton_2.Name = "closeButton"
  271. closeButton_2.Parent = healthGUI
  272. closeButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  273. closeButton_2.BorderColor3 = Color3.fromRGB(255, 255, 127)
  274. closeButton_2.Position = UDim2.new(0.901649058, 0, 0.0299145579, 0)
  275. closeButton_2.Size = UDim2.new(0, 41, 0, 41)
  276. closeButton_2.Font = Enum.Font.SourceSans
  277. closeButton_2.Text = "X"
  278. closeButton_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  279. closeButton_2.TextScaled = true
  280. closeButton_2.TextSize = 14.000
  281. closeButton_2.TextWrapped = true
  282. closeButton_2.MouseButton1Down:Connect(function()
  283. healthGUI.Visible = not healthGUI.Visible
  284. end)
  285.  
  286. funcGUI.Name = "funcGUI"
  287. funcGUI.Parent = wizardHax
  288. funcGUI.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
  289. funcGUI.Position = UDim2.new(0.0849672928, 0, 0.583538115, 0)
  290. funcGUI.Size = UDim2.new(0, 291, 0, 187)
  291. funcGUI.Visible = false
  292. funcGUI.Draggable = true
  293. funcGUI.Active = true
  294.  
  295. TextLabel.Parent = funcGUI
  296. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
  297. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  298. TextLabel.Size = UDim2.new(0, 64, 0, 33)
  299. TextLabel.Font = Enum.Font.SourceSans
  300. TextLabel.Text = "Functions"
  301. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  302. TextLabel.TextSize = 14.000
  303.  
  304. closeButton_3.Name = "closeButton"
  305. closeButton_3.Parent = funcGUI
  306. closeButton_3.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
  307. closeButton_3.BorderColor3 = Color3.fromRGB(255, 180, 28)
  308. closeButton_3.Position = UDim2.new(0.854735434, 0, 0.0352619998, 0)
  309. closeButton_3.Size = UDim2.new(0, 35, 0, 35)
  310. closeButton_3.Font = Enum.Font.SourceSans
  311. closeButton_3.Text = "X"
  312. closeButton_3.TextColor3 = Color3.fromRGB(0, 0, 0)
  313. closeButton_3.TextScaled = true
  314. closeButton_3.TextSize = 14.000
  315. closeButton_3.TextWrapped = true
  316. closeButton_3.MouseButton1Down:Connect(function()
  317. funcGUI.Visible = not funcGUI.Visible
  318. end)
  319.  
  320. funcButton1.Name = "funcButton1"
  321. funcButton1.Parent = funcGUI
  322. funcButton1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  323. funcButton1.Position = UDim2.new(0.0721649453, 0, 0.272727281, 0)
  324. funcButton1.Size = UDim2.new(0, 82, 0, 32)
  325. funcButton1.Font = Enum.Font.SourceSans
  326. funcButton1.Text = "Auto Get Money"
  327. funcButton1.TextColor3 = Color3.fromRGB(0, 0, 0)
  328. funcButton1.TextSize = 14.000
  329. funcButton1.MouseButton1Down:Connect(function()
  330. autoGetMoney = not autoGetMoney
  331. end)
  332.  
  333. funcButton3.Name = "funcButton3"
  334. funcButton3.Parent = funcGUI
  335. funcButton3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  336. funcButton3.Position = UDim2.new(0.646048129, 0, 0.272727281, 0)
  337. funcButton3.Size = UDim2.new(0, 82, 0, 32)
  338. funcButton3.Font = Enum.Font.SourceSans
  339. funcButton3.Text = "func 3"
  340. funcButton3.TextColor3 = Color3.fromRGB(0, 0, 0)
  341. funcButton3.TextSize = 14.000
  342.  
  343. funcButton6.Name = "funcButton6"
  344. funcButton6.Parent = funcGUI
  345. funcButton6.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  346. funcButton6.Position = UDim2.new(0.646048129, 0, 0.524064183, 0)
  347. funcButton6.Size = UDim2.new(0, 82, 0, 32)
  348. funcButton6.Font = Enum.Font.SourceSans
  349. funcButton6.Text = "func 6"
  350. funcButton6.TextColor3 = Color3.fromRGB(0, 0, 0)
  351. funcButton6.TextSize = 14.000
  352.  
  353. funcButton4.Name = "funcButton4"
  354. funcButton4.Parent = funcGUI
  355. funcButton4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  356. funcButton4.Position = UDim2.new(0.0721649453, 0, 0.524064183, 0)
  357. funcButton4.Size = UDim2.new(0, 82, 0, 32)
  358. funcButton4.Font = Enum.Font.SourceSans
  359. funcButton4.Text = "func 4"
  360. funcButton4.TextColor3 = Color3.fromRGB(0, 0, 0)
  361. funcButton4.TextSize = 14.000
  362.  
  363. funcButton9.Name = "funcButton9"
  364. funcButton9.Parent = funcGUI
  365. funcButton9.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  366. funcButton9.Position = UDim2.new(0.646048129, 0, 0.770053446, 0)
  367. funcButton9.Size = UDim2.new(0, 82, 0, 32)
  368. funcButton9.Font = Enum.Font.SourceSans
  369. funcButton9.Text = "func 9"
  370. funcButton9.TextColor3 = Color3.fromRGB(0, 0, 0)
  371. funcButton9.TextSize = 14.000
  372.  
  373. funcButton7.Name = "funcButton7"
  374. funcButton7.Parent = funcGUI
  375. funcButton7.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  376. funcButton7.Position = UDim2.new(0.0721649453, 0, 0.770053446, 0)
  377. funcButton7.Size = UDim2.new(0, 82, 0, 32)
  378. funcButton7.Font = Enum.Font.SourceSans
  379. funcButton7.Text = "func 7"
  380. funcButton7.TextColor3 = Color3.fromRGB(0, 0, 0)
  381. funcButton7.TextSize = 14.000
  382.  
  383. funcButton2.Name = "funcButton2"
  384. funcButton2.Parent = funcGUI
  385. funcButton2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  386. funcButton2.Position = UDim2.new(0.367697597, 0, 0.272727281, 0)
  387. funcButton2.Size = UDim2.new(0, 76, 0, 32)
  388. funcButton2.Font = Enum.Font.SourceSans
  389. funcButton2.Text = "Auto Buy Stuff"
  390. funcButton2.TextColor3 = Color3.fromRGB(0, 0, 0)
  391. funcButton2.TextSize = 14.000
  392. funcButton2.MouseButton1Down:Connect(function()
  393. autoBuyStuff = not autoBuyStuff
  394. end)
  395.  
  396. funcButton5.Name = "funcButton5"
  397. funcButton5.Parent = funcGUI
  398. funcButton5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  399. funcButton5.Position = UDim2.new(0.367697597, 0, 0.524064183, 0)
  400. funcButton5.Size = UDim2.new(0, 76, 0, 32)
  401. funcButton5.Font = Enum.Font.SourceSans
  402. funcButton5.Text = "func 5"
  403. funcButton5.TextColor3 = Color3.fromRGB(0, 0, 0)
  404. funcButton5.TextSize = 14.000
  405.  
  406. funcButton8.Name = "funcButton8"
  407. funcButton8.Parent = funcGUI
  408. funcButton8.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  409. funcButton8.Position = UDim2.new(0.367697597, 0, 0.770053506, 0)
  410. funcButton8.Size = UDim2.new(0, 76, 0, 32)
  411. funcButton8.Font = Enum.Font.SourceSans
  412. funcButton8.Text = "func 8"
  413. funcButton8.TextColor3 = Color3.fromRGB(0, 0, 0)
  414. funcButton8.TextSize = 14.000
  415.  
  416. openButton.Name = "openButton"
  417. openButton.Parent = wizardHax
  418. openButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  419. openButton.Position = UDim2.new(0.883169949, 0, 0.534398019, 0)
  420. openButton.Size = UDim2.new(0, 125, 0, 63)
  421. openButton.Draggable = true
  422. openButton.Active = true
  423.  
  424. openButton_2.Name = "openButton"
  425. openButton_2.Parent = openButton
  426. openButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  427. openButton_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  428. openButton_2.Position = UDim2.new(0.0795714334, 0, 0.158888876, 0)
  429. openButton_2.Size = UDim2.new(0, 105, 0, 41)
  430. openButton_2.Font = Enum.Font.SourceSans
  431. openButton_2.Text = "Open"
  432. openButton_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  433. openButton_2.TextScaled = true
  434. openButton_2.TextSize = 14.000
  435. openButton_2.TextWrapped = true
  436. openButton_2.MouseButton1Down:Connect(function()
  437. main.Visible = not main.Visible
  438. openButton.Visible = not openButton.Visible
  439. end)
  440.  
  441. -- functions
  442.  
  443. spawn(function()
  444. local players = game.Players
  445. local localplayer = players.LocalPlayer
  446. local team = localplayer.Team.Name
  447. local kit = game.Workspace:FindFirstChild("berezaa's Tycoon Kit")
  448. if not kit then
  449. return
  450. end
  451. local RedTeam
  452. local RedSecond
  453. local owner
  454. local Essentials
  455. local buttons
  456. local player
  457. local giver
  458. while not RedTeam do
  459. if team ~= "For Hire" then
  460. if team == "Blue" then
  461. RedTeam = kit:FindFirstChild("Pastel "..team)
  462. elseif team == "Yellow" then
  463. RedTeam = kit:FindFirstChild("Cool "..team:lower())
  464. else
  465. RedTeam = kit:FindFirstChild("Medium "..team:lower())
  466. end
  467. end
  468. wait(1)
  469. team = localplayer.Team.Name
  470. end
  471. if RedTeam[team.."First"].Gate.Head.Decal.Texture == 'http://www.roblox.com/Thumbs/Avatar.ashx?username='..localplayer.Name then
  472. RedSecond = RedTeam[team.."First"]
  473. owner = true
  474. else
  475. RedSecond = RedTeam[team.."Second"]
  476. end
  477. Essentials = RedTeam.Essentials
  478. buttons = RedSecond.Buttons:GetChildren()
  479. player = game.Players.LocalPlayer
  480. if owner then
  481. giver = Essentials.Giver
  482. else
  483. giver = Essentials.Giver2
  484. end
  485. -- auto buy stuff (it sucks it just tps everything to you and if you have enough money to buy it you buy it)
  486. spawn(function()
  487. while wait(1) do
  488. if autoBuyStuff then
  489. local character = player.Character
  490. for i,button in pairs(buttons) do
  491. local head = button:FindFirstChild("Head")
  492. if head and character and character:FindFirstChild("HumanoidRootPart") then
  493. local orginalTransparency = head.Transparency
  494. if orginalTransparency ~= 1 then
  495. local originalpos = head.CFrame
  496. head.CanCollide = false
  497. head.Transparency = 1
  498. head.CFrame = character.HumanoidRootPart.CFrame
  499. wait(0.01)
  500. head.CFrame = originalpos
  501. head.Transparency = orginalTransparency
  502. end
  503. end
  504. end
  505. end
  506. end
  507. end)
  508. -- tp the collect money pad to you
  509. spawn(function()
  510. while wait(1) do
  511. if autoGetMoney then
  512. local character = player.Character
  513. if character and character:FindFirstChild("HumanoidRootPart") then
  514. local originalpos = giver.CFrame
  515. giver.CanCollide = false
  516. giver.Transparency = 1
  517. giver.CFrame = character.HumanoidRootPart.CFrame
  518. wait(0.025)
  519. giver.CFrame = originalpos
  520. giver.Transparency = 0
  521. giver.CanCollide = true
  522. end
  523. end
  524. end
  525. end)
  526. end)
  527. function shootWand(x,y,z,damage)
  528. local character = LocalPlayer.Character
  529. if character then
  530. local wand = character:FindFirstChild("Wand")
  531. if not wand then
  532. wand = LocalPlayer.Backpack:FindFirstChild("Wand")
  533. if wand then
  534. LocalPlayer.Character.Humanoid:EquipTool(wand)
  535. wait(0.05)
  536. wand = character:FindFirstChild("Wand")
  537. spawn(function()
  538. wait(0.1)
  539. LocalPlayer.Character.Humanoid:UnequipTools(wand)
  540. end)
  541. else
  542. return
  543. end
  544. end
  545. if not wand then
  546. return
  547. end
  548. local tbl_main =
  549. {
  550. CFrame.new(x, y, z),
  551. 0,
  552. 0.1,
  553. wand,
  554. damage,
  555. character
  556. }
  557. wand.Fire:FireServer(unpack(tbl_main))
  558. wait(0.01)
  559. end
  560. end
  561. function shootPlayer(_player,damage)
  562. local character = LocalPlayer.Character
  563. if character then
  564. local wand = character:FindFirstChild("Wand")
  565. local pos = _player.Character.HumanoidRootPart.CFrame
  566. local vel = _player.Character.HumanoidRootPart.Velocity
  567. if not wand then
  568. wand = LocalPlayer.Backpack:FindFirstChild("Wand")
  569. if wand then
  570. LocalPlayer.Character.Humanoid:EquipTool(wand)
  571. wait(0.05)
  572. wand = character:FindFirstChild("Wand")
  573. spawn(function()
  574. wait(0.1)
  575. LocalPlayer.Character.Humanoid:UnequipTools(wand)
  576. end)
  577. else
  578. return
  579. end
  580. if not wand then
  581. return
  582. end
  583. end
  584. local tbl_main =
  585. {
  586. CFrame.new(pos.x+vel.x/5,pos.y+vel.y/5,pos.z+vel.z/5),
  587. 0,
  588. 0.1,
  589. wand,
  590. damage,
  591. character
  592. }
  593. wand.Fire:FireServer(unpack(tbl_main))
  594. wait(0.01)
  595. end
  596. end
  597. function getSelector(text)
  598. local selectors = {}
  599. for i,selector in pairs(string.split(text,",")) do
  600. if selector == "all" then
  601. for i,player in pairs(players:GetChildren()) do
  602. if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  603. selectors[table.getn(selectors)+1] = player
  604. end
  605. end
  606. else
  607. for i,player in pairs(players:GetChildren()) do
  608. if startsWith(player.Name,selector) and player.Name ~= LocalPlayer.Name and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  609. selectors[table.getn(selectors)+1] = player
  610. end
  611. end
  612. end
  613. end
  614. return selectors
  615. end
  616. function startsWith(text1,text2)
  617. if string.lower(string.sub(text1,1,#text2)) == string.lower(text2) then
  618. return true
  619. end
  620. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement