Advertisement
Aperture10

Untitled

Apr 28th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.75 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. table.sort(Actions)
  24.  
  25.  
  26. local SizeX = 3
  27. local SizeY = 3
  28. local SizeZ = 3
  29.  
  30. local menuUp = false
  31.  
  32. --if Player.Name ~= "Player1" then
  33. --repeat
  34. --wait(100000000)
  35. --until false
  36. --end
  37.  
  38. ---------------------------CLEAN UP------------------------------
  39.  
  40. --RealCamera:ClearAllChildren()
  41. --Player.PlayerGui:ClearAllChildren()
  42.  
  43. function freshLoad()
  44.  
  45. Player:LoadCharacter()
  46.  
  47. Char = Player.Character
  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. local punishedPlayers = {}
  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)
  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,v in pairs(punishedPlayers) do
  344. if gui.Text == v then
  345. gui.BackgroundColor = BrickColor.new("Really red")
  346. break
  347. else
  348. gui.BackgroundColor = BrickColor.new("Really black")
  349. end
  350. end
  351.  
  352.  
  353. gui.MouseButton1Click:connect(function()
  354. if gui.BackgroundColor == BrickColor.new("Really red") then
  355. gui.BackgroundColor = BrickColor.new("Really black")
  356. for i,v in pairs(punishedPlayers) do
  357. if v == gui.Text then
  358. table.remove(punishedPlayers, i)
  359. return
  360. end
  361. end
  362. end
  363.  
  364. if game.Players:FindFirstChild(gui.Text) then
  365. gui.BackgroundColor = BrickColor.new("Really red")
  366. table.insert(punishedPlayers, gui.Text)
  367. spawn(function()
  368. repeat
  369. wait(0.5)
  370. game.Players[gui.Text]:LoadCharacter()
  371. for i,v in pairs(punishedPlayers) do
  372. if v == gui.Text then
  373. break
  374. elseif i == #punishedPlayers then
  375. return
  376. end
  377. end
  378. until game.Players:findFirstChild(gui.Text) == nil
  379. end)
  380. end
  381. end)
  382. end
  383. end)
  384.  
  385.  
  386.  
  387.  
  388.  
  389. end)
  390.  
  391. end)
  392.  
  393. end
  394.  
  395. freshLoad()
  396.  
  397.  
  398. -----------------------------------------------------------------
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407. local GhostPart = Instance.new("Part")
  408. GhostPart.CanCollide = false
  409. GhostPart.Anchored = true
  410. GhostPart.Transparency = 0.5
  411. GhostPart.Size = Vector3.new(SizeX,SizeY,SizeZ)
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419. --workspace.CurrentCamera.CameraType = "Scriptable"
  420.  
  421.  
  422. function getMasterModel(target)
  423. repeat
  424. wait()
  425.  
  426. if Char:IsAncestorOf(target) or menuUp then
  427. return nil
  428. end
  429.  
  430.  
  431.  
  432. if target.Parent ~= workspace then
  433. target = target.Parent
  434. else
  435. if target.Name == "Base" then return nil end --We don't want to mess with the baseplate
  436. return target
  437. end
  438. until target == false
  439. end
  440.  
  441. function DestroyFunction()
  442. if Mode == "Model" then
  443. getMasterModel(Mouse.Target):Destroy()
  444. elseif Mode == "Part" then
  445. Mouse.Target:Destroy()
  446. end
  447. end
  448.  
  449. function KillFunction()
  450. for i,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  451. if v:IsA("Humanoid") then
  452. v.Health = 0
  453. v:Destroy()
  454. end
  455. end
  456. end
  457.  
  458. function BreakJointsFunction()
  459. if Mode == "Model" then
  460. getMasterModel(Mouse.Target):BreakJoints()
  461. elseif Mode == "Part" then
  462. Mouse.Target:BreakJoints()
  463. end
  464. end
  465.  
  466. function DistortFunction()
  467. if Mode == "Model" then
  468. for _,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  469. if v:IsA("Part") or v:IsA("WedgePart") then
  470. if v.Size.X > 1 and v.Size.Y > 1 and v.Size.Z > 1 then
  471. 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))
  472. v.Color = Color3.new(math.random(),math.random(),math.random())
  473. end
  474. end
  475. end
  476. elseif Mode == "Part" then
  477. local v = Mouse.Target
  478. 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))
  479. v.Color = Color3.new(math.random(),math.random(),math.random())
  480. end
  481. end
  482.  
  483. function rektFunction()
  484. if Mode == "Model" then
  485. for _,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  486. if v:IsA("Part") or v:IsA("WedgePart") then
  487. v:breakJoints()
  488. v.Anchored = false
  489. v.Velocity = Vector3.new(math.random(-1000,1000),math.random(-1000,1000),math.random(-1000,1000))
  490. v.Color = Color3.new(math.random(),math.random(),math.random())
  491. end
  492. end
  493. elseif Mode == "Part" then
  494. local v = Mouse.Target
  495. v:breakJoints()
  496. v.Anchored = false
  497. v.Velocity = Vector3.new(math.random(-1000,1000),math.random(-1000,1000),math.random(-1000,1000))
  498. v.Color = Color3.new(math.random(),math.random(),math.random())
  499. end
  500. end
  501.  
  502. function AnchorFunction()
  503. if Mode == "Model" then
  504. for _,v in pairs (getMasterModel(Mouse.Target):GetDescendants()) do
  505. if v:IsA("Part") or v:IsA("WedgePart") then
  506. v.Anchored = not v.Anchored
  507. end
  508. end
  509. elseif Mode == "Part" then
  510. Mouse.Target.Anchored = not Mouse.Target.Anchored
  511. end
  512. end
  513.  
  514. function PushFunction()
  515. if Mode == "Model" then
  516. for _,v in pairs (getMasterModel(Mouse.Target):GetDescendants()) do
  517. if v:IsA("Part") or v:IsA("WedgePart") then
  518. v.Anchored = false
  519. v.Velocity = Mouse.Target.CFrame.lookVector * 1000
  520. end
  521. end
  522. elseif Mode == "Part" then
  523. Mouse.Target.Anchored = false
  524. Mouse.Target.Velocity = Mouse.Target.CFrame.lookVector * 1000
  525. end
  526. end
  527.  
  528. function FreezeFunction()
  529. if Mode == "Model" then
  530. for _,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  531. if v:IsA("Part") or v:IsA("WedgePart") then
  532. v.BrickColor = BrickColor.new("Pastel Blue")
  533. v.Anchored = true
  534. v.Material = "Ice"
  535. end
  536. end
  537. elseif Mode == "Part" then
  538. Mouse.Target.Anchored = true
  539. Mouse.Material = "Ice"
  540. end
  541. end
  542.  
  543. function CloneFunction()
  544. if Mode == "Model" then
  545. Mouse.Target.Parent.Archivable = true
  546. local c = getMasterModel(Mouse.Target):Clone()
  547. c.Parent = workspace
  548. c:MakeJoints()
  549. c:MoveTo(Mouse.Target.CFrame.p + Vector3.new(0,5,0))
  550. spawn(function()
  551.  
  552. local targets = {}
  553.  
  554. if c:findFirstChild("Humanoid") and c:findFirstChild("Torso") then
  555. local human = c.Humanoid
  556. local torso = c.Torso
  557.  
  558. local bp = Instance.new("BodyPosition",torso)
  559. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  560. bp.Position = torso.Position
  561.  
  562. if c:findFirstChild("Right Arm") and c:findFirstChild("Left Arm") then ---Put the arms up like a zombie
  563. local zarm1 = c["Right Arm"]
  564. local zarm2 = c["Left Arm"]
  565.  
  566. local weld = Instance.new("Weld",c)
  567. weld.Part0 = torso
  568. weld.Part1 = zarm2
  569. weld.C0 = CFrame.new(-1.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0) --Left arm
  570.  
  571. local weld = Instance.new("Weld",c)
  572. weld.Part0 = torso
  573. weld.Part1 = zarm1
  574. weld.C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0) --Right arm
  575.  
  576. local function touchChaos(hit)
  577.  
  578.  
  579. if hit.Name == c.Name then return end
  580. if getMasterModel(hit).Name == c.Name then return end
  581. if hit.Parent == c then return end
  582. if hit.Parent:findFirstChild("Torso") then
  583. if hit.Parent.Torso:findFirstChild("BodyPosition") then
  584. return ----Don't hurt other clones
  585. end
  586. end
  587.  
  588. print('touched '..hit.Name..'parent of '..hit.Parent.Name..'I AM: '..c.Name)
  589.  
  590. if hit.Parent:findFirstChild("Humanoid") then
  591. hit.Parent.Humanoid:Destroy()
  592. elseif hit.Parent ~= workspace and hit.BrickColor ~= BrickColor.new("Really red") then
  593. for i,v in pairs(getMasterModel(hit):GetDescendants()) do
  594. if v:IsA("Part") or v:IsA("WedgePart") then
  595. v:breakJoints()
  596. v.Anchored = false
  597. v.Velocity = Vector3.new(math.random(-250,250),math.random(-250,250),math.random(-250,250))
  598. v.BrickColor = BrickColor.new("Really red")
  599. end
  600. end
  601. game:GetService("Debris"):AddItem(getMasterModel(hit), 5)
  602. elseif hit:IsA("Part") and hit.Name ~= "Base" then
  603. hit:Destroy()
  604. end
  605. end
  606.  
  607. zarm1.Touched:connect(touchChaos)
  608. zarm2.Touched:connect(touchChaos)
  609. end
  610.  
  611. repeat
  612.  
  613. local players = workspace:GetChildren()
  614.  
  615.  
  616.  
  617. local enemyTorso = nil
  618. local enemyHuman = nil
  619. local enemyTorsoDistance = nil
  620.  
  621. for i,v in pairs(players) do
  622.  
  623.  
  624. if v:findFirstChild("Humanoid") and v:findFirstChild("Torso") and v ~= c and v.Name ~= c.Name then
  625.  
  626.  
  627. if (v.Torso.Position - torso.Position).magnitude < 200 and v.Humanoid.Health > 0 and
  628. v.Torso:findFirstChild("BodyPosition") == nil and enemyTorso == nil then
  629.  
  630. enemyTorsoDistance = (v.Torso.Position - torso.Position).magnitude
  631. enemyTorso = v.Torso
  632. enemyHuman = v.Humanoid
  633.  
  634. elseif enemyTorso ~= nil then
  635.  
  636. if (v.Torso.Position - torso.Position).magnitude < enemyTorsoDistance and v.Humanoid.Health > 0 and
  637. v.Torso:findFirstChild("BodyPosition") == nil and enemyTorso == nil then
  638.  
  639. enemyTorsoDistance = (v.Torso.Position - torso.Position).magnitude
  640. enemyTorso = v.Torso
  641. enemyHuman = v.Humanoid
  642.  
  643. end
  644.  
  645. end
  646. end
  647. end
  648.  
  649. if enemyTorso ~= nil and enemyHuman ~= nil then
  650. print("Target: "..enemyHuman.Parent.Name.."I am: "..c.Name)
  651. human:MoveTo(enemyTorso.Position, enemyTorso)
  652. human.WalkSpeed = 20
  653. human.Jump = true
  654. bp.Position = enemyTorso.Position
  655. end
  656.  
  657.  
  658. wait(2)
  659.  
  660.  
  661. until human == nil or human.Health < 1 or torso == nil
  662. game:GetService("Debris"):AddItem(c, 0.1)
  663. end
  664. end)
  665. elseif Mode == "Part" then
  666. Mouse.Target.Archivable = true
  667. local c = Mouse.Target:Clone()
  668. c.Parent = workspace
  669. c.CFrame = Mouse.Target.CFrame + Vector3.new(0,5,0)
  670. end
  671. end
  672.  
  673. function WeldFunction()
  674. if Mode == "Model" then
  675. local welds = {}
  676. for _,v in pairs(getMasterModel(Mouse.Target):GetDescendants()) do
  677. if v:IsA("Part") or v:IsA("WedgePart") then
  678. table.insert(welds, v)
  679. local weld = Instance.new("Weld")
  680. weld.Parent = workspace
  681. weld.Part0 = welds[math.random(#welds)]
  682. weld.Part1 = v
  683. weld.C1 = CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  684. end
  685. end
  686. end
  687. end
  688.  
  689.  
  690. function BuildFunction()
  691. local p = Instance.new("Part",workspace)
  692. p.CFrame = GhostPart.CFrame
  693. p:MakeJoints()
  694. p.Anchored = true
  695. p.Size = Vector3.new(SizeX,SizeY,SizeZ)
  696. end
  697.  
  698. function LaserFunction()
  699. if Mouse.Target.Parent:findFirstChild("Humanoid") then
  700. Mouse.Target.Parent.Humanoid:TakeDamage(25)
  701. end
  702. local Laser = Instance.new("Part",workspace)
  703. Laser.Anchored = true
  704. Laser.BrickColor = BrickColor.new("Really red")
  705. Laser.TopSurface = "Smooth"
  706. Laser.BottomSurface = "Smooth"
  707. Laser.Size = Vector3.new(0.4,0.4,(Mouse.Hit.p - Camera.CFrame.p).magnitude)
  708. Laser.CFrame = CFrame.new(Camera.CFrame.p, Mouse.Hit.p):toWorldSpace(CFrame.new(0,0,-(Camera.CFrame.p- Mouse.Hit.p).magnitude/2))
  709. game:GetService("Debris"):AddItem(Laser,1)
  710. spawn(function()
  711. repeat
  712. wait()
  713. Laser.Transparency = Laser.Transparency + 0.05
  714. Laser.Size = Laser.Size - Vector3.new(0.05,0,0.05)
  715. until Laser.Transparency > 1
  716. end)
  717. end
  718.  
  719. function ActionFunction()
  720. if Action == "Destroy" then
  721. DestroyFunction()
  722. elseif Action == "Kill" then
  723. KillFunction()
  724. elseif Action == "BreakJoints" then
  725. BreakJointsFunction()
  726. elseif Action == "Distort" then
  727. DistortFunction()
  728. elseif Action == "Anchor" then
  729. AnchorFunction()
  730. elseif Action == "Push" then
  731. PushFunction()
  732. elseif Action == "Freeze" then
  733. FreezeFunction()
  734. elseif Action == "Clone" then
  735. CloneFunction()
  736. elseif Action == "Build" then
  737. BuildFunction()
  738. elseif Action == "Laser" then
  739. LaserFunction()
  740. elseif Action == "Rekt" then
  741. rektFunction()
  742. elseif Action == "Weld" then
  743. WeldFunction()
  744. end
  745. end
  746.  
  747.  
  748.  
  749. local mouseTarget = nil
  750.  
  751. Mouse.Move:connect(function()
  752.  
  753. if Player.Character:findFirstChild("Eye") == nil then freshLoad() end
  754. if workspace:findFirstChild(Player.Name) == nil then freshLoad() end
  755.  
  756.  
  757. Camera.CFrame = CFrame.new(Camera.CFrame.p, RealCamera.CFrame.p)
  758.  
  759. if Mouse.Target ~= nil then
  760.  
  761. if mouseTarget == Mouse.Target then --Don't waste resources when we already have what we want
  762. return
  763. end
  764.  
  765.  
  766.  
  767. if Mode == "Part" then
  768. mouseTarget = Mouse.Target
  769. SB.Adornee = Mouse.Target
  770. elseif Mode == "Model" then
  771. mouseTarget = Mouse.Target
  772. SB.Adornee = getMasterModel(Mouse.Target)--Mouse.Target.Parent
  773. end
  774.  
  775. if Action == "Build" then
  776. GhostPart.Parent = Char
  777. if Mouse.Target ~= GhostPart then
  778. GhostPart.CFrame = CFrame.new(Mouse.Hit.p)
  779. end
  780. elseif Action ~= "Build" then
  781. GhostPart.Parent = nil
  782. end
  783.  
  784. else
  785. SB.Adornee = ""
  786. end
  787. end)
  788.  
  789. Mouse.Button1Down:connect(function()
  790. if Mouse.Target ~= nil then
  791. ActionFunction()
  792. end
  793. end)
  794.  
  795. local keyS = false
  796. local keyW = false
  797. local keyA = false
  798. local keyD = false
  799.  
  800. local speed = 0.7 -- fast is 5
  801.  
  802. GuiSlider2 = nil
  803. GuiSlider1 = nil
  804.  
  805. Mouse.KeyDown:connect(function(key)
  806. if key == "c" then
  807. Mode = "Part"
  808. elseif key == "v" then
  809. Mode = "Model"
  810. elseif key == "z" then
  811. Selection = Selection + 1
  812. if Selection > #Actions then
  813. Selection = 1
  814. end
  815. Action = Actions[Selection]
  816. elseif key == "x" then
  817. Selection = Selection - 1
  818. if Selection < 1 then
  819. Selection = #Actions
  820. end
  821. Action = Actions[Selection]
  822. end
  823.  
  824. if Action == "Build" and key == "x" or key == "z" and Action == "Build" then
  825. GuiSlider1 = Instance.new("TextButton",ScreenGui)
  826. GuiSlider1.Text = "<"
  827. GuiSlider1.Size = UDim2.new(0,25,0,25)
  828. GuiSlider1.Transparency = 0.3
  829. GuiSlider1.BackgroundColor = BrickColor.new("Black")
  830. GuiSlider1.TextColor = BrickColor.new("White")
  831. GuiSlider1.Position = UDim2.new(0.7,1,0.895,1)
  832. GuiSlider1.MouseButton1Down:connect(function()
  833. SizeX = SizeX - 1
  834. if SizeX < 1 then
  835. SizeX = 3
  836. end
  837. end)
  838.  
  839. GuiSlider2 = Instance.new("TextButton",ScreenGui)
  840. GuiSlider2.Text = ">"
  841. GuiSlider2.Size = UDim2.new(0,25,0,25)
  842. GuiSlider2.Transparency = 0.3
  843. GuiSlider2.BackgroundColor = BrickColor.new("Black")
  844. GuiSlider2.TextColor = BrickColor.new("White")
  845. GuiSlider2.Position = UDim2.new(0.859,1,0.895,1)
  846. GuiSlider2.MouseButton1Down:connect(function()
  847. SizeX = SizeX + 1
  848. if SizeX > 3 then
  849. SizeX = 1
  850. end
  851. end)
  852. elseif GuiSlider1 ~= nil and GuiSlider2 ~= nil and Action ~= "Build" then
  853. GuiSlider1:Destroy()
  854. GuiSlider2:Destroy()
  855. end
  856.  
  857. if string.byte(key) == 48 then
  858. speed = 5
  859.  
  860.  
  861. elseif key == "s" then
  862. keyS = true
  863. repeat
  864. wait()
  865. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(0,0,-speed))
  866. EyeWeld.C0 = CFrame.new(0,0,0.7)
  867. until keyS == false
  868.  
  869.  
  870. elseif key =="w" then
  871. keyW = true
  872. repeat
  873. wait()
  874. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(0,0,speed))
  875. EyeWeld.C0 = CFrame.new(0,0,0.7)
  876. until keyW == false
  877.  
  878.  
  879. elseif key =="a" then
  880. keyA = true
  881. repeat
  882. wait()
  883. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(speed,0,0))
  884. until keyA == false
  885.  
  886.  
  887. elseif key =="d" then
  888. keyD = true
  889. repeat
  890. wait()
  891. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(-speed,0,0))
  892. until keyD == false
  893.  
  894.  
  895. elseif key == "e" then
  896. Camera.Transparency = math.abs(Camera.Transparency - 1)
  897. end
  898. GuiM.Text = "Action: "..Action..", Mode: "..Mode
  899. end)
  900.  
  901.  
  902. function keyLiftedFunction(key)
  903. print(string.byte(key))
  904.  
  905. if key == "s" then keyS = false end
  906. if key == "a" then keyA = false end
  907. if key == "d" then keyD = false end
  908. if key == "w" then keyW = false end
  909. if string.byte(key) == 48 then speed = 0.7 end
  910. end
  911.  
  912. Mouse.KeyUp:connect(keyLiftedFunction)
  913.  
  914.  
  915.  
  916.  
  917.  
  918. wait(2)
  919. Player.Backpack:ClearAllChildren()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement