Advertisement
Aperture10

Untitled

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