Advertisement
Aperture10

Untitled

Apr 28th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.97 KB | None | 0 0
  1.  
  2.  
  3. --Designed and Coded by Kangerujack 2016
  4. --Revisioned 2018
  5.  
  6.  
  7. ----------------------Local Variables----------------------------
  8.  
  9.  
  10. local Player = game.Players.LocalPlayer
  11.  
  12. local Mouse = Player:GetMouse()
  13.  
  14. local RealCamera = workspace.CurrentCamera
  15.  
  16.  
  17. local Actions = {"Destroy","Kill","BreakJoints","Distort","Anchor","Push","Freeze",
  18. "Clone","Build","Laser","Rekt","Weld"}
  19. local Action = "Destroy"
  20. local Selection = 1
  21. local Mode = "Model"--{"Part","Model"}
  22.  
  23. local punishedPlayers = {}
  24.  
  25. table.sort(Actions)
  26.  
  27.  
  28. local SizeX = 3
  29. local SizeY = 3
  30. local SizeZ = 3
  31.  
  32. local menuUp = false
  33.  
  34. --if Player.Name ~= "Player1" then
  35. --repeat
  36. --wait(100000000)
  37. --until false
  38. --end
  39.  
  40. ---------------------------CLEAN UP------------------------------
  41.  
  42. --RealCamera:ClearAllChildren()
  43. --Player.PlayerGui:ClearAllChildren()
  44.  
  45. function freshLoad()
  46.  
  47. Char = workspace:WaitForChild(Player.Name)
  48.  
  49. for _,v in pairs(Char:GetChildren()) do
  50. print("Checking: "..v.Name)
  51. if v:IsA("Part") or v:IsA("Humanoid") or v:IsA("Hat") then
  52. print("Destroying part: "..v.Name)
  53. v:Destroy()
  54. end
  55. end
  56.  
  57.  
  58. Camera = Instance.new("Part",Char) -- New character
  59. Camera.Size = Vector3.new(1.5,1.5,1.5)
  60. Camera.Shape = "Ball"
  61. Camera.BrickColor = BrickColor.new("Really black")
  62. Camera.CanCollide = false
  63. Camera.TopSurface = "Smooth"
  64. Camera.BottomSurface = "Smooth"
  65. Camera.Anchored = true
  66. Camera.Locked = true
  67. Camera.CFrame = CFrame.new(0,10,0)
  68. Camera.BackSurface = "Motor"
  69. Camera.Name = "Eye"
  70.  
  71. Eye = Instance.new("Part",Char)
  72. Eye.Size = Vector3.new(0.4,0.4,0.4)
  73. Eye.Shape = "Ball"
  74. Eye.BrickColor = BrickColor.new("White")
  75. Eye.CanCollide = false
  76. Eye.TopSurface = "Smooth"
  77. Eye.BottomSurface = "Smooth"
  78. Eye.Locked = true
  79. Eye:BreakJoints()
  80.  
  81. EyeWeld = Instance.new("Weld")
  82. EyeWeld.Parent = Char
  83. EyeWeld.Part0 = Eye
  84. EyeWeld.Part1 = Camera
  85. EyeWeld.C0 = CFrame.new(0,0,0.7)
  86.  
  87. ScreenGui = Instance.new("ScreenGui",Player.PlayerGui) ----------------------BASIC GUI---------------------------------
  88.  
  89. GuiM = Instance.new("TextButton",ScreenGui)
  90. GuiM.Size = UDim2.new(0,250,0,50)
  91. GuiM.Position = UDim2.new(0.7,1,0.8,1) --0.95= 5
  92. GuiM.Text = "Action: Destroy, Model"
  93. GuiM.BackgroundColor = BrickColor.new("Really black")
  94. GuiM.Transparency = 0.3
  95. GuiM.TextColor = BrickColor.new("White")
  96.  
  97. SB = Instance.new("SelectionBox",workspace.CurrentCamera)
  98.  
  99. workspace.CurrentCamera.CameraSubject = Camera
  100.  
  101. local guiAnimating = false
  102.  
  103. GuiM.MouseButton1Click:connect(function()
  104.  
  105. if guiAnimating == true then return end
  106.  
  107.  
  108.  
  109. function closeGui()
  110. for i,v in pairs(ActionsGui) do
  111. spawn(function()
  112. ActionsGui[i].Text = ""
  113. repeat
  114. guiAnimating = true
  115. wait()
  116. ActionsGui[i].Size = UDim2.new(0,ActionsGui[i].Size.X.Offset - 15,0,ActionsGui[i].Size.Y.Offset)
  117. until ActionsGui[i].Size.X.Offset < 1
  118. ActionsGui[i]:Destroy()
  119. guiAnimating = false
  120. menuUp = false
  121. end)
  122. end
  123. end
  124.  
  125. if menuUp == true then
  126.  
  127. closeGui()
  128.  
  129. return --Don't do it
  130.  
  131. end
  132.  
  133. if guiMenu ~= nil then
  134. guiMenu:Destroy()
  135. end
  136.  
  137. guiMenu = Instance.new("Folder",ScreenGui)
  138.  
  139. menuUp = true
  140.  
  141. local selectionGui = nil
  142. local selectionGuiMode = nil
  143.  
  144.  
  145.  
  146.  
  147.  
  148. ActionsGui = {}
  149. for i,v in pairs(Actions) do
  150. local gui = Instance.new("TextButton",guiMenu)
  151. gui.Size = UDim2.new(0,125,0,25)
  152. gui.Position = GuiM.Position + UDim2.new(0,0,0,-25 * i)
  153. gui.Text = v
  154. gui.BackgroundColor = BrickColor.new("Really black")
  155. gui.Transparency = 0.3
  156. gui.TextColor = BrickColor.new("White")
  157.  
  158. gui.MouseButton1Click:connect(function()
  159. if selectionGui == nil then
  160. gui.BackgroundColor = BrickColor.new("Really red")
  161. selectionGui = gui
  162. else
  163. selectionGui.BackgroundColor = BrickColor.new("Really black")
  164. gui.BackgroundColor = BrickColor.new("Really red")
  165. selectionGui = gui
  166. end
  167. end)
  168. table.insert(ActionsGui, gui)
  169. end
  170.  
  171.  
  172. for i = 1, 2 do
  173. local gui = Instance.new("TextButton",guiMenu)
  174. gui.Size = UDim2.new(0,125,0,25)
  175. gui.Position = GuiM.Position + UDim2.new(0,125,0,-25 * i)
  176.  
  177. gui.BackgroundColor = BrickColor.new("Really black")
  178. gui.Transparency = 0.3
  179. gui.TextColor = BrickColor.new("White")
  180. if i == 1 then
  181. gui.Text = "Part"
  182. else
  183. gui.Text = "Model"
  184. gui.BackgroundColor = BrickColor.new("Really red")
  185. selectionGuiMode = gui
  186. end
  187.  
  188. gui.MouseButton1Click:connect(function()
  189. if selectionGuiMode == nil then
  190. gui.BackgroundColor = BrickColor.new("Really red")
  191. selectionGuiMode = gui
  192. else
  193. selectionGuiMode.BackgroundColor = BrickColor.new("Really black")
  194. gui.BackgroundColor = BrickColor.new("Really red")
  195. selectionGuiMode = gui
  196. end
  197. end)
  198.  
  199. table.insert(ActionsGui, gui)
  200. end
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208. local gui = Instance.new("TextButton",guiMenu) ----------------Okay we will change what mode we are in!
  209. gui.Size = UDim2.new(0,50,0,25)
  210. gui.Position = GuiM.Position + UDim2.new(0,250,0,0)
  211. gui.Text = "Okay"
  212. gui.BackgroundColor = BrickColor.new("Bright green")
  213. gui.Transparency = 0.3
  214. gui.TextColor = BrickColor.new("White")
  215. gui.MouseButton1Click:connect(function()
  216.  
  217. Action = selectionGui.Text
  218. Mode = selectionGuiMode.Text
  219.  
  220. GuiM.Text = "Action: "..Action..", Mode: "..Mode
  221.  
  222. closeGui()
  223. end)
  224.  
  225. table.insert(ActionsGui, gui)
  226.  
  227. local gui = Instance.new("TextButton",guiMenu)
  228. gui.Size = UDim2.new(0,50,0,25)
  229. gui.Position = GuiM.Position + UDim2.new(0,250,0,25)
  230. gui.Text = "Cancel"
  231. gui.BackgroundColor = BrickColor.new("Bright red")
  232. gui.Transparency = 0.3
  233. gui.TextColor = BrickColor.new("White")
  234. gui.MouseButton1Click:connect(closeGui)
  235.  
  236. table.insert(ActionsGui, gui)
  237.  
  238. local gui = Instance.new("TextButton",guiMenu) ----------------------------------PROGRAMS MARK-----------------------------------------||||
  239. gui.Size = UDim2.new(0,75,0,25)
  240. gui.Position = GuiM.Position + UDim2.new(0,-75,0,25)
  241. gui.Text = "Programs"
  242. gui.BackgroundColor = BrickColor.new("Bright red")
  243. gui.Transparency = 0.3
  244. gui.TextColor = BrickColor.new("White")
  245. table.insert(ActionsGui, gui)
  246.  
  247. gui.MouseButton1Click:connect(function() -------------------------------------Track Player Function------------------------------------------
  248. local gui = Instance.new("TextButton",guiMenu)
  249. gui.Size = UDim2.new(0,75,0,25)
  250. gui.Position = GuiM.Position + UDim2.new(0,-75,0,0)
  251. gui.Text = "Track"
  252. gui.BackgroundColor = BrickColor.new("Bright green")
  253. gui.Transparency = 0.3
  254. gui.TextColor = BrickColor.new("White")
  255. table.insert(ActionsGui, gui)
  256.  
  257.  
  258. gui.MouseButton1Click:connect(function() -------------------------------------------------Load players---------------------------------
  259. for i,v in pairs(game.Players:GetPlayers()) do
  260. local gui = Instance.new("TextButton",guiMenu)
  261. gui.Size = UDim2.new(0,75,0,25)
  262. gui.Position = GuiM.Position + UDim2.new(0,-150,0,(-25 * i) + 25)
  263. gui.Text = v.Name
  264. gui.BackgroundColor = BrickColor.new("Really black")
  265. gui.Transparency = 0.3
  266. gui.TextColor = BrickColor.new("White")
  267. table.insert(ActionsGui, gui)
  268. gui.MouseButton1Click:connect(function() -------When they select a player
  269. if game.Players:findFirstChild(gui.Text) then
  270. local targetPlayer = game.Players[gui.Text]
  271. if targetPlayer.Character:findFirstChild("Head") and targetPlayer.Character:findFirstChild("Humanoid") then
  272.  
  273.  
  274.  
  275. RealCamera.CameraSubject = targetPlayer.Character.Head
  276. closeGui()
  277.  
  278. local gui = Instance.new("TextButton",ScreenGui)
  279. gui.Size = UDim2.new(0,75,0,50)
  280. gui.Position = GuiM.Position + UDim2.new(0,-200,0,0)
  281. gui.Text = "Exit Tracker"
  282. gui.BackgroundColor = BrickColor.new("Really red")
  283. gui.Transparency = 0.3
  284. gui.TextColor = BrickColor.new("White")
  285. gui.MouseButton1Click:connect(function()
  286. RealCamera.CameraSubject = Camera
  287. gui:Destroy()
  288. end)
  289.  
  290.  
  291. spawn(function()
  292. repeat
  293. wait(1)
  294.  
  295. --Conditions to check to make sure we don't get locked in
  296. if RealCamera.CameraSubject ~= targetPlayer.Character.Head then
  297. break
  298. end
  299.  
  300.  
  301. if workspace:findFirstChild(targetPlayer.Name) == nil then
  302. break
  303. end
  304.  
  305. if targetPlayer.Character:findFirstChild("Humanoid") == nil then
  306. break
  307. end
  308.  
  309. if targetPlayer.Character.Humanoid.Health < 1 then
  310. break
  311. end
  312. until false
  313. RealCamera.CameraSubject = Camera
  314. gui:Destroy()
  315. end)
  316. end
  317. end
  318. end)
  319. end
  320. end)
  321.  
  322.  
  323. local gui = Instance.new("TextButton",guiMenu) ----------------------------------------Punish Player---------------------------
  324. gui.Size = UDim2.new(0,75,0,25)
  325. gui.Position = GuiM.Position + UDim2.new(0,-75,0,-25)
  326. gui.Text = "Punish"
  327. gui.BackgroundColor = BrickColor.new("Bright green")
  328. gui.Transparency = 0.3
  329. gui.TextColor = BrickColor.new("White")
  330. table.insert(ActionsGui, gui)
  331.  
  332.  
  333. gui.MouseButton1Click:connect(function() ----------------------------------------Punish Player------------------------
  334. for i,v in pairs(game.Players:GetChildren()) do
  335. local gui = Instance.new("TextButton",guiMenu)
  336. gui.Size = UDim2.new(0,75,0,25)
  337. gui.Position = GuiM.Position + UDim2.new(0,-151,0,-25* i)
  338. gui.Text = v.Name
  339. gui.Transparency = 0.3
  340. gui.TextColor = BrickColor.new("Really black")
  341. table.insert(ActionsGui, gui)
  342.  
  343. for i,x in pairs(punishedPlayers) do
  344. print(gui.Text,x)
  345. if gui.Text == x then
  346. gui.BackgroundColor = BrickColor.new("Really red")
  347. break
  348. else
  349. gui.BackgroundColor = BrickColor.new("Really black")
  350. end
  351. end
  352.  
  353.  
  354. gui.MouseButton1Click:connect(function()
  355. if gui.BackgroundColor == BrickColor.new("Really red") then
  356. gui.BackgroundColor = BrickColor.new("Really black")
  357. for i,x in pairs(punishedPlayers) do
  358. if x == gui.Text then
  359. table.remove(punishedPlayers, i)
  360. return
  361. end
  362. end
  363. end
  364.  
  365. if game.Players:FindFirstChild(gui.Text) then
  366. gui.BackgroundColor = BrickColor.new("Really red")
  367. table.insert(punishedPlayers, gui.Text)
  368. local punishTarget = gui.Text
  369. spawn(function()
  370. repeat
  371. wait(0.5)
  372. game.Players[punishTarget].Character:Destroy()
  373. print('destroying player: '..punishTarget)
  374. for i,x in pairs(punishedPlayers) do
  375. if x == punishTarget then
  376. print('player still in punishment')
  377. break
  378. elseif i == #punishedPlayers then
  379. print('player not in punishment anymore')
  380. return
  381. end
  382. end
  383. until game.Players:findFirstChild(punishTarget) == nil
  384. end)
  385. end
  386. end)
  387. end
  388. end)
  389.  
  390.  
  391.  
  392.  
  393.  
  394. end)
  395.  
  396. end)
  397.  
  398. end
  399.  
  400. freshLoad()
  401.  
  402.  
  403. -----------------------------------------------------------------
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412. local GhostPart = Instance.new("Part")
  413. GhostPart.CanCollide = false
  414. GhostPart.Anchored = true
  415. GhostPart.Transparency = 0.5
  416. GhostPart.Size = Vector3.new(SizeX,SizeY,SizeZ)
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424. --workspace.CurrentCamera.CameraType = "Scriptable"
  425.  
  426.  
  427. function getMasterModel(target)
  428. repeat
  429. wait()
  430.  
  431. if Char:IsAncestorOf(target) or menuUp then
  432. return nil
  433. end
  434.  
  435.  
  436.  
  437. if target.Parent ~= workspace then
  438. target = target.Parent
  439. else
  440. if target.Name == "Base" then return nil end --We don't want to mess with the baseplate
  441. return target
  442. end
  443. until target == false
  444. end
  445.  
  446. function DestroyFunction()
  447. if Mode == "Model" then
  448. getMasterModel(Mouse.Target):Destroy()
  449. elseif Mode == "Part" then
  450. Mouse.Target:Destroy()
  451. end
  452. end
  453.  
  454. function KillFunction()
  455. for i,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  456. if v:IsA("Humanoid") then
  457. v.Health = 0
  458. v:Destroy()
  459. end
  460. end
  461. end
  462.  
  463. function BreakJointsFunction()
  464. if Mode == "Model" then
  465. getMasterModel(Mouse.Target):BreakJoints()
  466. elseif Mode == "Part" then
  467. Mouse.Target:BreakJoints()
  468. end
  469. end
  470.  
  471. function DistortFunction()
  472. if Mode == "Model" then
  473. for _,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  474. if v:IsA("Part") or v:IsA("WedgePart") then
  475. if v.Size.X > 1 and v.Size.Y > 1 and v.Size.Z > 1 then
  476. v.Size = Vector3.new(math.random(v.Size.X),math.random(v.Size.Y),math.random(v.Size.Z)) + Vector3.new(math.random(v.Size.X),math.random(v.Size.Y),math.random(v.Size.Z))
  477. v.Color = Color3.new(math.random(),math.random(),math.random())
  478. end
  479. end
  480. end
  481. elseif Mode == "Part" then
  482. local v = Mouse.Target
  483. v.Size = Vector3.new(math.random(v.Size.X),math.random(v.Size.Y),math.random(v.Size.Z)) + Vector3.new(math.random(v.Size.X),math.random(v.Size.Y),math.random(v.Size.Z))
  484. v.Color = Color3.new(math.random(),math.random(),math.random())
  485. end
  486. end
  487.  
  488. function rektFunction()
  489. if Mode == "Model" then
  490. for _,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  491. if v:IsA("Part") or v:IsA("WedgePart") then
  492. v:breakJoints()
  493. v.Anchored = false
  494. v.Velocity = Vector3.new(math.random(-1000,1000),math.random(-1000,1000),math.random(-1000,1000))
  495. v.Color = Color3.new(math.random(),math.random(),math.random())
  496. end
  497. end
  498. elseif Mode == "Part" then
  499. local v = Mouse.Target
  500. v:breakJoints()
  501. v.Anchored = false
  502. v.Velocity = Vector3.new(math.random(-1000,1000),math.random(-1000,1000),math.random(-1000,1000))
  503. v.Color = Color3.new(math.random(),math.random(),math.random())
  504. end
  505. end
  506.  
  507. function AnchorFunction()
  508. if Mode == "Model" then
  509. for _,v in pairs (getMasterModel(Mouse.Target):GetDescendants()) do
  510. if v:IsA("Part") or v:IsA("WedgePart") then
  511. v.Anchored = not v.Anchored
  512. end
  513. end
  514. elseif Mode == "Part" then
  515. Mouse.Target.Anchored = not Mouse.Target.Anchored
  516. end
  517. end
  518.  
  519. function PushFunction()
  520. if Mode == "Model" then
  521. for _,v in pairs (getMasterModel(Mouse.Target):GetDescendants()) do
  522. if v:IsA("Part") or v:IsA("WedgePart") then
  523. v.Anchored = false
  524. v.Velocity = Mouse.Target.CFrame.lookVector * 1000
  525. end
  526. end
  527. elseif Mode == "Part" then
  528. Mouse.Target.Anchored = false
  529. Mouse.Target.Velocity = Mouse.Target.CFrame.lookVector * 1000
  530. end
  531. end
  532.  
  533. function FreezeFunction()
  534. if Mode == "Model" then
  535. for _,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  536. if v:IsA("Part") or v:IsA("WedgePart") then
  537. v.BrickColor = BrickColor.new("Pastel Blue")
  538. v.Anchored = true
  539. v.Material = "Ice"
  540. end
  541. end
  542. elseif Mode == "Part" then
  543. Mouse.Target.Anchored = true
  544. Mouse.Material = "Ice"
  545. end
  546. end
  547.  
  548. function CloneFunction()
  549. if Mode == "Model" then
  550. Mouse.Target.Parent.Archivable = true
  551. local c = getMasterModel(Mouse.Target):Clone()
  552. c.Parent = workspace
  553. c:MakeJoints()
  554. c:MoveTo(Mouse.Target.CFrame.p + Vector3.new(0,5,0))
  555. spawn(function()
  556.  
  557. local targets = {}
  558.  
  559. if c:findFirstChild("Humanoid") and c:findFirstChild("Torso") then
  560. local human = c.Humanoid
  561. local torso = c.Torso
  562.  
  563. local bp = Instance.new("BodyPosition",torso)
  564. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  565. bp.Position = torso.Position
  566.  
  567. if c:findFirstChild("Right Arm") and c:findFirstChild("Left Arm") then ---Put the arms up like a zombie
  568. local zarm1 = c["Right Arm"]
  569. local zarm2 = c["Left Arm"]
  570.  
  571. local weld = Instance.new("Weld",c)
  572. weld.Part0 = torso
  573. weld.Part1 = zarm2
  574. weld.C0 = CFrame.new(-1.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0) --Left arm
  575.  
  576. local weld = Instance.new("Weld",c)
  577. weld.Part0 = torso
  578. weld.Part1 = zarm1
  579. weld.C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0) --Right arm
  580.  
  581. local function touchChaos(hit)
  582.  
  583.  
  584. if hit.Name == c.Name then return end
  585. if getMasterModel(hit).Name == c.Name then return end
  586. if hit.Parent == c then return end
  587. if hit.Parent:findFirstChild("Torso") then
  588. if hit.Parent.Torso:findFirstChild("BodyPosition") then
  589. return ----Don't hurt other clones
  590. end
  591. end
  592.  
  593. print('touched '..hit.Name..'parent of '..hit.Parent.Name..'I AM: '..c.Name)
  594.  
  595. if hit.Parent:findFirstChild("Humanoid") then
  596. hit.Parent.Humanoid:Destroy()
  597. elseif hit.Parent ~= workspace and hit.BrickColor ~= BrickColor.new("Really red") then
  598. for i,v in pairs(getMasterModel(hit):GetDescendants()) do
  599. if v:IsA("Part") or v:IsA("WedgePart") then
  600. v:breakJoints()
  601. v.Anchored = false
  602. v.Velocity = Vector3.new(math.random(-250,250),math.random(-250,250),math.random(-250,250))
  603. v.BrickColor = BrickColor.new("Really red")
  604. end
  605. end
  606. game:GetService("Debris"):AddItem(getMasterModel(hit), 5)
  607. elseif hit:IsA("Part") and hit.Name ~= "Base" then
  608. hit:Destroy()
  609. end
  610. end
  611.  
  612. zarm1.Touched:connect(touchChaos)
  613. zarm2.Touched:connect(touchChaos)
  614. end
  615.  
  616. repeat
  617.  
  618. local players = workspace:GetChildren()
  619.  
  620.  
  621.  
  622. local enemyTorso = nil
  623. local enemyHuman = nil
  624. local enemyTorsoDistance = nil
  625.  
  626. for i,v in pairs(players) do
  627.  
  628.  
  629. if v:findFirstChild("Humanoid") and v:findFirstChild("Torso") and v ~= c and v.Name ~= c.Name then
  630.  
  631.  
  632. if (v.Torso.Position - torso.Position).magnitude < 200 and v.Humanoid.Health > 0 and
  633. v.Torso:findFirstChild("BodyPosition") == nil and enemyTorso == nil then
  634.  
  635. enemyTorsoDistance = (v.Torso.Position - torso.Position).magnitude
  636. enemyTorso = v.Torso
  637. enemyHuman = v.Humanoid
  638.  
  639. elseif enemyTorso ~= nil then
  640.  
  641. if (v.Torso.Position - torso.Position).magnitude < enemyTorsoDistance and v.Humanoid.Health > 0 and
  642. v.Torso:findFirstChild("BodyPosition") == nil and enemyTorso == nil then
  643.  
  644. enemyTorsoDistance = (v.Torso.Position - torso.Position).magnitude
  645. enemyTorso = v.Torso
  646. enemyHuman = v.Humanoid
  647.  
  648. end
  649.  
  650. end
  651. end
  652. end
  653.  
  654. if enemyTorso ~= nil and enemyHuman ~= nil then
  655. print("Target: "..enemyHuman.Parent.Name.."I am: "..c.Name)
  656. human:MoveTo(enemyTorso.Position, enemyTorso)
  657. human.WalkSpeed = 20
  658. human.Jump = true
  659. bp.Position = enemyTorso.Position
  660. end
  661.  
  662.  
  663. wait(2)
  664.  
  665.  
  666. until human == nil or human.Health < 1 or torso == nil
  667. game:GetService("Debris"):AddItem(c, 0.1)
  668. end
  669. end)
  670. elseif Mode == "Part" then
  671. Mouse.Target.Archivable = true
  672. local c = Mouse.Target:Clone()
  673. c.Parent = workspace
  674. c.CFrame = Mouse.Target.CFrame + Vector3.new(0,5,0)
  675. end
  676. end
  677.  
  678. function WeldFunction()
  679. if Mode == "Model" then
  680. local welds = {}
  681. for _,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  682. if v:IsA("Part") or v:IsA("WedgePart") then
  683. table.insert(welds, v)
  684. local weld = Instance.new("Weld")
  685. weld.Parent = workspace
  686. weld.Part0 = welds[math.random(#welds)]
  687. weld.Part1 = v
  688. weld.C1 = CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  689. end
  690. end
  691. end
  692. end
  693.  
  694.  
  695. function BuildFunction()
  696. local p = Instance.new("Part",workspace)
  697. p.CFrame = GhostPart.CFrame
  698. p:MakeJoints()
  699. p.Anchored = true
  700. p.Size = Vector3.new(SizeX,SizeY,SizeZ)
  701. end
  702.  
  703. function LaserFunction()
  704. if Mouse.Target.Parent:findFirstChild("Humanoid") then
  705. Mouse.Target.Parent.Humanoid:TakeDamage(25)
  706. end
  707. local Laser = Instance.new("Part",workspace)
  708. Laser.Anchored = true
  709. Laser.BrickColor = BrickColor.new("Really red")
  710. Laser.TopSurface = "Smooth"
  711. Laser.BottomSurface = "Smooth"
  712. Laser.Size = Vector3.new(0.4,0.4,(Mouse.Hit.p - Camera.CFrame.p).magnitude)
  713. Laser.CFrame = CFrame.new(Camera.CFrame.p, Mouse.Hit.p):toWorldSpace(CFrame.new(0,0,-(Camera.CFrame.p- Mouse.Hit.p).magnitude/2))
  714. game:GetService("Debris"):AddItem(Laser,1)
  715. spawn(function()
  716. repeat
  717. wait()
  718. Laser.Transparency = Laser.Transparency + 0.05
  719. Laser.Size = Laser.Size - Vector3.new(0.05,0,0.05)
  720. until Laser.Transparency > 1
  721. end)
  722. end
  723.  
  724. function ActionFunction()
  725. if Action == "Destroy" then
  726. DestroyFunction()
  727. elseif Action == "Kill" then
  728. KillFunction()
  729. elseif Action == "BreakJoints" then
  730. BreakJointsFunction()
  731. elseif Action == "Distort" then
  732. DistortFunction()
  733. elseif Action == "Anchor" then
  734. AnchorFunction()
  735. elseif Action == "Push" then
  736. PushFunction()
  737. elseif Action == "Freeze" then
  738. FreezeFunction()
  739. elseif Action == "Clone" then
  740. CloneFunction()
  741. elseif Action == "Build" then
  742. BuildFunction()
  743. elseif Action == "Laser" then
  744. LaserFunction()
  745. elseif Action == "Rekt" then
  746. rektFunction()
  747. elseif Action == "Weld" then
  748. WeldFunction()
  749. end
  750. end
  751.  
  752.  
  753.  
  754. local mouseTarget = nil
  755.  
  756. Mouse.Move:connect(function()
  757.  
  758. if Player.Character:findFirstChild("Eye") == nil then freshLoad() end
  759. if workspace:findFirstChild(Player.Name) == nil then freshLoad() end
  760.  
  761.  
  762. Camera.CFrame = CFrame.new(Camera.CFrame.p, RealCamera.CFrame.p)
  763.  
  764. if Mouse.Target ~= nil then
  765.  
  766. if mouseTarget == Mouse.Target then --Don't waste resources when we already have what we want
  767. return
  768. end
  769.  
  770.  
  771.  
  772. if Mode == "Part" then
  773. mouseTarget = Mouse.Target
  774. SB.Adornee = Mouse.Target
  775. elseif Mode == "Model" then
  776. mouseTarget = Mouse.Target
  777. SB.Adornee = getMasterModel(Mouse.Target)--Mouse.Target.Parent
  778. end
  779.  
  780. if Action == "Build" then
  781. GhostPart.Parent = Char
  782. if Mouse.Target ~= GhostPart then
  783. GhostPart.CFrame = CFrame.new(Mouse.Hit.p)
  784. end
  785. elseif Action ~= "Build" then
  786. GhostPart.Parent = nil
  787. end
  788.  
  789. else
  790. SB.Adornee = ""
  791. end
  792. end)
  793.  
  794. Mouse.Button1Down:connect(function()
  795. if Mouse.Target ~= nil then
  796. ActionFunction()
  797. end
  798. end)
  799.  
  800. local keyS = false
  801. local keyW = false
  802. local keyA = false
  803. local keyD = false
  804.  
  805. local speed = 0.7 -- fast is 5
  806.  
  807. GuiSlider2 = nil
  808. GuiSlider1 = nil
  809.  
  810. Mouse.KeyDown:connect(function(key)
  811. if key == "c" then
  812. Mode = "Part"
  813. elseif key == "v" then
  814. Mode = "Model"
  815. elseif key == "z" then
  816. Selection = Selection + 1
  817. if Selection > #Actions then
  818. Selection = 1
  819. end
  820. Action = Actions[Selection]
  821. elseif key == "x" then
  822. Selection = Selection - 1
  823. if Selection < 1 then
  824. Selection = #Actions
  825. end
  826. Action = Actions[Selection]
  827. end
  828.  
  829. if Action == "Build" and key == "x" or key == "z" and Action == "Build" then
  830. GuiSlider1 = Instance.new("TextButton",ScreenGui)
  831. GuiSlider1.Text = "<"
  832. GuiSlider1.Size = UDim2.new(0,25,0,25)
  833. GuiSlider1.Transparency = 0.3
  834. GuiSlider1.BackgroundColor = BrickColor.new("Black")
  835. GuiSlider1.TextColor = BrickColor.new("White")
  836. GuiSlider1.Position = UDim2.new(0.7,1,0.895,1)
  837. GuiSlider1.MouseButton1Down:connect(function()
  838. SizeX = SizeX - 1
  839. if SizeX < 1 then
  840. SizeX = 3
  841. end
  842. end)
  843.  
  844. GuiSlider2 = Instance.new("TextButton",ScreenGui)
  845. GuiSlider2.Text = ">"
  846. GuiSlider2.Size = UDim2.new(0,25,0,25)
  847. GuiSlider2.Transparency = 0.3
  848. GuiSlider2.BackgroundColor = BrickColor.new("Black")
  849. GuiSlider2.TextColor = BrickColor.new("White")
  850. GuiSlider2.Position = UDim2.new(0.859,1,0.895,1)
  851. GuiSlider2.MouseButton1Down:connect(function()
  852. SizeX = SizeX + 1
  853. if SizeX > 3 then
  854. SizeX = 1
  855. end
  856. end)
  857. elseif GuiSlider1 ~= nil and GuiSlider2 ~= nil and Action ~= "Build" then
  858. GuiSlider1:Destroy()
  859. GuiSlider2:Destroy()
  860. end
  861.  
  862. if string.byte(key) == 48 then
  863. speed = 5
  864.  
  865.  
  866. elseif key == "s" then
  867. keyS = true
  868. repeat
  869. wait()
  870. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(0,0,-speed))
  871. EyeWeld.C0 = CFrame.new(0,0,0.7)
  872. until keyS == false
  873.  
  874.  
  875. elseif key =="w" then
  876. keyW = true
  877. repeat
  878. wait()
  879. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(0,0,speed))
  880. EyeWeld.C0 = CFrame.new(0,0,0.7)
  881. until keyW == false
  882.  
  883.  
  884. elseif key =="a" then
  885. keyA = true
  886. repeat
  887. wait()
  888. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(speed,0,0))
  889. until keyA == false
  890.  
  891.  
  892. elseif key =="d" then
  893. keyD = true
  894. repeat
  895. wait()
  896. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(-speed,0,0))
  897. until keyD == false
  898.  
  899.  
  900. elseif key == "e" then
  901. Camera.Transparency = math.abs(Camera.Transparency - 1)
  902. end
  903. GuiM.Text = "Action: "..Action..", Mode: "..Mode
  904. end)
  905.  
  906.  
  907. function keyLiftedFunction(key)
  908. print(string.byte(key))
  909.  
  910. if key == "s" then keyS = false end
  911. if key == "a" then keyA = false end
  912. if key == "d" then keyD = false end
  913. if key == "w" then keyW = false end
  914. if string.byte(key) == 48 then speed = 0.7 end
  915. end
  916.  
  917. Mouse.KeyUp:connect(keyLiftedFunction)
  918.  
  919.  
  920.  
  921.  
  922.  
  923. wait(2)
  924. Player.Backpack:ClearAllChildren()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement