Advertisement
Aperture10

Untitled

Apr 28th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.46 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. 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.  
  591. if hit.Name == c.Name then return end
  592. if getMasterModel(hit) == nil or hit.Parent == nil then return end
  593. if getMasterModel(hit).Name == c.Name then return end
  594. if hit.Parent == c then return end
  595. if hit.Parent:findFirstChild("Torso") then
  596. if hit.Parent.Torso:findFirstChild("BodyPosition") then
  597. return ----Don't hurt other clones
  598. end
  599. end
  600.  
  601. print('touched '..hit.Name..'parent of '..hit.Parent.Name..'I AM: '..c.Name)
  602.  
  603. if hit.Parent:findFirstChild("Humanoid") then
  604. hit.Parent.Humanoid:Destroy()
  605. elseif hit.Parent ~= workspace and hit.BrickColor ~= BrickColor.new("Really red") then
  606. for i,v in pairs(getMasterModel(hit):GetDescendants()) do
  607. if v:IsA("Part") or v:IsA("WedgePart") then
  608. v:breakJoints()
  609. v.Anchored = false
  610. v.Velocity = Vector3.new(math.random(-250,250),math.random(-250,250),math.random(-250,250))
  611. v.BrickColor = BrickColor.new("Really red")
  612. end
  613. end
  614. game:GetService("Debris"):AddItem(getMasterModel(hit), 5)
  615. elseif hit:IsA("Part") and hit.Name ~= "Base" then
  616. hit:Destroy()
  617. end
  618. end
  619.  
  620. zarm1.Touched:connect(touchChaos)
  621. zarm2.Touched:connect(touchChaos)
  622. end
  623.  
  624. repeat
  625.  
  626. local targets = {}
  627.  
  628. local players = workspace:GetChildren()
  629.  
  630.  
  631.  
  632. local enemyTorso = nil
  633. local enemyHuman = nil
  634. local enemyTorsoDistance = nil
  635.  
  636. for i,v in pairs(players) do
  637.  
  638.  
  639. if v:findFirstChild("Humanoid") and v:findFirstChild("Torso") and v ~= c and v.Name ~= c.Name then
  640.  
  641.  
  642. if (v.Torso.Position - torso.Position).magnitude < 200 and v.Humanoid.Health > 0 and
  643. v.Torso:findFirstChild("BodyPosition") == nil then
  644.  
  645. enemyTorsoDistance = (v.Torso.Position - torso.Position).magnitude
  646. enemyTorso = v.Torso
  647. enemyHuman = v.Humanoid
  648.  
  649. table.insert(targets, enemyTorso)
  650.  
  651.  
  652. end
  653. end
  654. end
  655.  
  656. if #targets > 0 then
  657. local target = targets[math.random(#targets)]
  658. print("Target: "..target.Parent.Name.."I am: "..c.Name)
  659. human:MoveTo(target.Position, target)
  660. human.WalkSpeed = 20
  661. human.Jump = true
  662. bp.Position = target.Position
  663. end
  664.  
  665.  
  666. wait(2)
  667.  
  668.  
  669.  
  670. until human == nil or human.Health < 1 or torso == nil or human.Parent.Parent == nil
  671. print(c.Name.." has died!")
  672. game:GetService("Debris"):AddItem(c, 0.1)
  673. end
  674. end)
  675. end
  676.  
  677. function WeldFunction()
  678. local welds = {}
  679. for _,v in pairs(SB.Adornee:GetDescendants()) do
  680. if v:IsA("Part","WedgePart","UnionOperation") then
  681. table.insert(welds, v)
  682. local weld = Instance.new("Weld")
  683. weld.Parent = workspace
  684. weld.Part0 = welds[math.random(#welds)]
  685. weld.Part1 = v
  686. weld.C1 = CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  687. end
  688. end
  689. end
  690.  
  691.  
  692. function BuildFunction()
  693. local p = Instance.new("Part",workspace)
  694. p.CFrame = GhostPart.CFrame
  695. p:MakeJoints()
  696. p.Anchored = true
  697. p.Size = Vector3.new(SizeX,SizeY,SizeZ)
  698. end
  699.  
  700. function LaserFunction()
  701. if SB.Adornee:findFirstChild("Humanoid") then
  702. SB.Adornee.Humanoid:TakeDamage(25)
  703. end
  704. local Laser = Instance.new("Part",workspace)
  705. Laser.Anchored = true
  706. Laser.BrickColor = BrickColor.new("Really red")
  707. Laser.TopSurface = "Smooth"
  708. Laser.BottomSurface = "Smooth"
  709. Laser.Size = Vector3.new(0.4,0.4,(Mouse.Hit.p - Camera.CFrame.p).magnitude)
  710. Laser.CFrame = CFrame.new(Camera.CFrame.p, Mouse.Hit.p):toWorldSpace(CFrame.new(0,0,-(Camera.CFrame.p- Mouse.Hit.p).magnitude/2))
  711. game:GetService("Debris"):AddItem(Laser,1)
  712. spawn(function()
  713. repeat
  714. wait()
  715. Laser.Transparency = Laser.Transparency + 0.05
  716. Laser.Size = Laser.Size - Vector3.new(0.05,0,0.05)
  717. until Laser.Transparency > 1
  718. end)
  719. end
  720.  
  721. function ActionFunction()
  722. if Action == "Destroy" then
  723. DestroyFunction()
  724. elseif Action == "Kill" then
  725. KillFunction()
  726. elseif Action == "BreakJoints" then
  727. BreakJointsFunction()
  728. elseif Action == "Distort" then
  729. DistortFunction()
  730. elseif Action == "Anchor" then
  731. AnchorFunction()
  732. elseif Action == "Push" then
  733. PushFunction()
  734. elseif Action == "Freeze" then
  735. FreezeFunction()
  736. elseif Action == "Clone" then
  737. CloneFunction()
  738. elseif Action == "Build" then
  739. BuildFunction()
  740. elseif Action == "Laser" then
  741. LaserFunction()
  742. elseif Action == "Rekt" then
  743. rektFunction()
  744. elseif Action == "Weld" then
  745. WeldFunction()
  746. end
  747. end
  748.  
  749.  
  750.  
  751. local mouseTarget = nil
  752.  
  753. Mouse.Move:connect(function()
  754.  
  755. if Player.Character:findFirstChild("Eye") == nil then freshLoad() end
  756. if workspace:findFirstChild(Player.Name) == nil then freshLoad() end
  757.  
  758.  
  759. Camera.CFrame = CFrame.new(Camera.CFrame.p, RealCamera.CFrame.p)
  760.  
  761. if Mouse.Target ~= nil then
  762.  
  763. if mouseTarget == Mouse.Target then --Don't waste resources when we already have what we want
  764. return
  765. end
  766.  
  767.  
  768.  
  769. if Mode == "Part" then
  770. mouseTarget = Mouse.Target
  771. SB.Adornee = Mouse.Target
  772. elseif Mode == "Model" then
  773. mouseTarget = Mouse.Target
  774. SB.Adornee = getMasterModel(Mouse.Target)--Mouse.Target.Parent
  775. end
  776.  
  777. if Action == "Build" then
  778. GhostPart.Parent = Char
  779. if Mouse.Target ~= GhostPart then
  780. GhostPart.CFrame = CFrame.new(Mouse.Hit.p)
  781. end
  782. elseif Action ~= "Build" then
  783. GhostPart.Parent = nil
  784. end
  785.  
  786. else
  787. SB.Adornee = nil
  788. end
  789. end)
  790.  
  791. Mouse.Button1Down:connect(function()
  792. if Mouse.Target ~= nil then
  793. ActionFunction()
  794. end
  795. end)
  796.  
  797. local keyS = false
  798. local keyW = false
  799. local keyA = false
  800. local keyD = false
  801.  
  802. local speed = 0.7 -- fast is 5
  803.  
  804. GuiSlider2 = nil
  805. GuiSlider1 = nil
  806.  
  807. Mouse.KeyDown:connect(function(key)
  808. if key == "c" then
  809. Mode = "Part"
  810. elseif key == "v" then
  811. Mode = "Model"
  812. elseif key == "z" then
  813. Selection = Selection + 1
  814. if Selection > #Actions then
  815. Selection = 1
  816. end
  817. Action = Actions[Selection]
  818. elseif key == "x" then
  819. Selection = Selection - 1
  820. if Selection < 1 then
  821. Selection = #Actions
  822. end
  823. Action = Actions[Selection]
  824. end
  825.  
  826. if Action == "Build" and key == "x" or key == "z" and Action == "Build" then
  827. GuiSlider1 = Instance.new("TextButton",ScreenGui)
  828. GuiSlider1.Text = "<"
  829. GuiSlider1.Size = UDim2.new(0,25,0,25)
  830. GuiSlider1.Transparency = 0.3
  831. GuiSlider1.BackgroundColor = BrickColor.new("Black")
  832. GuiSlider1.TextColor = BrickColor.new("White")
  833. GuiSlider1.Position = UDim2.new(0.7,1,0.895,1)
  834. GuiSlider1.MouseButton1Down:connect(function()
  835. SizeX = SizeX - 1
  836. if SizeX < 1 then
  837. SizeX = 3
  838. end
  839. end)
  840.  
  841. GuiSlider2 = Instance.new("TextButton",ScreenGui)
  842. GuiSlider2.Text = ">"
  843. GuiSlider2.Size = UDim2.new(0,25,0,25)
  844. GuiSlider2.Transparency = 0.3
  845. GuiSlider2.BackgroundColor = BrickColor.new("Black")
  846. GuiSlider2.TextColor = BrickColor.new("White")
  847. GuiSlider2.Position = UDim2.new(0.859,1,0.895,1)
  848. GuiSlider2.MouseButton1Down:connect(function()
  849. SizeX = SizeX + 1
  850. if SizeX > 3 then
  851. SizeX = 1
  852. end
  853. end)
  854. elseif GuiSlider1 ~= nil and GuiSlider2 ~= nil and Action ~= "Build" then
  855. GuiSlider1:Destroy()
  856. GuiSlider2:Destroy()
  857. end
  858.  
  859. if string.byte(key) == 48 then
  860. speed = 5
  861.  
  862.  
  863. elseif key == "s" then
  864. keyS = true
  865. repeat
  866. wait()
  867. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(0,0,-speed))
  868. EyeWeld.C0 = CFrame.new(0,0,0.7)
  869. until keyS == false
  870.  
  871.  
  872. elseif key =="w" then
  873. keyW = true
  874. repeat
  875. wait()
  876. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(0,0,speed))
  877. EyeWeld.C0 = CFrame.new(0,0,0.7)
  878. until keyW == false
  879.  
  880.  
  881. elseif key =="a" then
  882. keyA = true
  883. repeat
  884. wait()
  885. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(speed,0,0))
  886. until keyA == false
  887.  
  888.  
  889. elseif key =="d" then
  890. keyD = true
  891. repeat
  892. wait()
  893. Camera.CFrame = Camera.CFrame:toWorldSpace(CFrame.new(-speed,0,0))
  894. until keyD == false
  895.  
  896.  
  897. elseif key == "e" then
  898. Camera.Transparency = math.abs(Camera.Transparency - 1)
  899. end
  900. GuiM.Text = "Action: "..Action..", Mode: "..Mode
  901. end)
  902.  
  903.  
  904. function keyLiftedFunction(key)
  905. print(string.byte(key))
  906.  
  907. if key == "s" then keyS = false end
  908. if key == "a" then keyA = false end
  909. if key == "d" then keyD = false end
  910. if key == "w" then keyW = false end
  911. if string.byte(key) == 48 then speed = 0.7 end
  912. end
  913.  
  914. Mouse.KeyUp:connect(keyLiftedFunction)
  915.  
  916.  
  917.  
  918.  
  919.  
  920. wait(2)
  921. Player.Backpack:ClearAllChildren()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement