Advertisement
Aperture10

Untitled

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