Advertisement
Aperture10

Untitled

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