King_Dice

Spy

Feb 12th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.54 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local char = player.Character
  3. local PlayerGui = player.PlayerGui
  4. repeat
  5. wait()
  6. until player and char
  7. local torso = char.Torso
  8. local head = char.Head
  9. cloakoffd = true
  10. local human = char.Humanoid
  11. local mana = 100
  12. local arm = {
  13. Left = char["Left Arm"],
  14. Right = char["Right Arm"]
  15. }
  16. local leg = {
  17. Left = char["Left Leg"],
  18. Right = char["Right Leg"]
  19. }
  20. ArtificialHB = Instance.new("BindableEvent", script)
  21. ArtificialHB.Name = "Heartbeat"
  22. script:WaitForChild("Heartbeat")
  23. frame = 0.03333333333333333
  24. tf = 0
  25. allowframeloss = false
  26. tossremainder = false
  27. lastframe = tick()
  28. script.Heartbeat:Fire()
  29. game:GetService("RunService").Heartbeat:connect(function(s, p)
  30. tf = tf + s
  31. if tf >= frame then
  32. if allowframeloss then
  33. script.Heartbeat:Fire()
  34. lastframe = tick()
  35. else
  36. for i = 1, math.floor(tf / frame) do
  37. script.Heartbeat:Fire()
  38. end
  39. lastframe = tick()
  40. end
  41. if tossremainder then
  42. tf = 0
  43. else
  44. tf = tf - frame * math.floor(tf / frame)
  45. end
  46. end
  47. end)
  48. function swait(num)
  49. if num == 0 or num == nil then
  50. ArtificialHB.Event:wait()
  51. else
  52. for i = 0, num do
  53. ArtificialHB.Event:wait()
  54. end
  55. end
  56. end
  57. local c = function(f)
  58. coroutine.resume(coroutine.create(f))
  59. end
  60. local p = function(f)
  61. pcall(f)
  62. end
  63. local add = {
  64. Part = function(par, a, c, col, t, s, cf, ms)
  65. local p = Instance.new("Part", par)
  66. pcall(function()
  67. p.TopSurface = "Smooth"
  68. p.BottomSurface = "Smooth"
  69. p.formFactor = "Custom"
  70. p.Anchored = a
  71. p.CanCollide = c
  72. p.BrickColor = BrickColor.new(col)
  73. p.Transparency = t
  74. p.Size = s
  75. p.CFrame = cf or CFrame.new()
  76. end)
  77. local m = Instance.new("BlockMesh", p)
  78. pcall(function()
  79. m.Scale = ms or Vector3.new(1, 1, 1)
  80. end)
  81. return p
  82. end,
  83. Wedge = function(par, a, c, col, t, s, cf, ms)
  84. local p = Instance.new("WedgePart", par)
  85. pcall(function()
  86. p.TopSurface = "Smooth"
  87. p.BottomSurface = "Smooth"
  88. p.formFactor = "Custom"
  89. p.Anchored = a
  90. p.CanCollide = c
  91. p.BrickColor = BrickColor.new(col)
  92. p.Transparency = t
  93. p.Size = s
  94. p.CFrame = cf or CFrame.new()
  95. end)
  96. local m = Instance.new("SpecialMesh", p)
  97. pcall(function()
  98. m.Scale = ms or Vector3.new(1, 1, 1)
  99. m.MeshType = "Wedge"
  100. end)
  101. return p
  102. end,
  103. Gui = function(ins, par, bc, bg, tc, fs, text, t, s, pos)
  104. local g = Instance.new(ins, par)
  105. pcall(function()
  106. g.BorderColor = BrickColor.new(bc)
  107. g.BackgroundColor = BrickColor.new(bg)
  108. g.TextColor = BrickColor.new(tc)
  109. g.FontSize = fs
  110. g.Font = "ArialBold"
  111. g.Text = text
  112. g.Transparency = t
  113. g.Size = s
  114. g.Position = pos
  115. end)
  116. return g
  117. end,
  118. Weld = function(par, p1, cf)
  119. local w = Instance.new("Weld", par)
  120. pcall(function()
  121. w.Part0 = w.Parent or par
  122. w.Part1 = p1
  123. w.C1 = cf or CFrame.new()
  124. end)
  125. return w
  126. end,
  127. Mesh = function(ins, par, s, of, t)
  128. local m = Instance.new(ins, par)
  129. pcall(function()
  130. m.Scale = s or Vector3.new()
  131. m.Offset = of or Vector3.new()
  132. m.MeshType = t
  133. end)
  134. return m
  135. end,
  136. Sound = function(parent, id, volume, pitch)
  137. local s = Instance.new("Sound", parent)
  138. pcall(function()
  139. s.SoundId = id
  140. s.Volume = volume
  141. s.Pitch = pitch
  142. end)
  143. return s
  144. end
  145. }
  146. local scriptname = "Spy"
  147. pcall(function()
  148. player.Backpack[scriptname]:remove()
  149. char[scriptname]:remove()
  150. char.Objects:remove()
  151. player.PlayerGui[scriptname]:remove()
  152. end)
  153. local model = Instance.new("Model", char)
  154. model.Name = "Objects"
  155. local modelB = Instance.new("Model", char)
  156. modelB.Name = scriptname
  157. local gui = Instance.new("ScreenGui", player.PlayerGui)
  158. gui.Name = scriptname
  159. local bin = script.Parent
  160. local skincolor = "Really black"
  161. local body = {}
  162. local animate = {}
  163. local obj = {}
  164. function createParts()
  165. body.Torso = add.Part(model, false, false, skincolor, 1, Vector3.new(2, 2, 1), nil)
  166. body.ArmLeft, body.ArmRight = add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  167. body.LegLeft, body.LegRight = add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 1, Vector3.new(1, 1, 1), nil)
  168. body.TorsoW = add.Weld(body.Torso, torso, nil)
  169. body.ArmLeftW, body.ArmRightW = add.Weld(body.ArmLeft, body.Torso, CFrame.new(-1.5, 0.5, 0)), add.Weld(body.ArmRight, body.Torso, CFrame.new(1.5, 0.5, 0))
  170. body.LegLeftW, body.LegRightW = add.Weld(body.LegLeft, body.Torso, CFrame.new(-0.5, -1.5, 0)), add.Weld(body.LegRight, body.Torso, CFrame.new(0.5, -1.5, 0))
  171. add.Weld(arm.Left, body.ArmLeft, CFrame.new(0, -0.5, 0))
  172. add.Weld(arm.Right, body.ArmRight, CFrame.new(0, -0.5, 0))
  173. torso["Left Hip"].Part0 = body.Torso
  174. torso["Right Hip"].Part0 = body.Torso
  175. animate = {
  176. Torso = function(cf)
  177. body.Torso.Transparency = 0
  178. torso.Transparency = 1
  179. body.TorsoW.C1 = cf
  180. end,
  181. ArmLeft = function(cf)
  182. body.ArmLeftW.C1 = CFrame.new(-1.5, 0.5, 0) * cf
  183. end,
  184. ArmRight = function(cf)
  185. body.ArmRightW.C1 = CFrame.new(1.5, 0.5, 0) * cf
  186. end,
  187. LegLeft = function(cf)
  188. body.LegLeftW.C1 = CFrame.new(-0.5, -1.5, 0) * cf
  189. end,
  190. LegRight = function(cf)
  191. body.LegRightW.C1 = CFrame.new(0.5, -1.5, 0) * cf
  192. end
  193. }
  194. obj.HandleBack = add.Part(modelB, false, false, "Really black", 0, Vector3.new(0.2, 1, 0.2), nil)
  195. obj.HandleBackW = add.Weld(obj.HandleBack, body.ArmRight, CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(90), 0, 0))
  196. obj.EdgeBot = add.Part(modelB, false, false, "Really black", 0, Vector3.new(0.2, 0.2, 0.2), nil)
  197. obj.EdgeBotM = add.Mesh("CylinderMesh", obj.EdgeBot, Vector3.new(1, 1, 1), nil, nil)
  198. obj.EdgeBotW = add.Weld(obj.EdgeBot, obj.HandleBack, CFrame.new(0, -0.5, 0) * CFrame.Angles(math.rad(90), 0, math.rad(90)))
  199. obj.EdgeTopR = add.Part(modelB, false, false, "Really black", 0, Vector3.new(0.2, 0.2, 0.2), nil)
  200. obj.EdgeTopRM = add.Mesh("CylinderMesh", obj.EdgeTopR, Vector3.new(1, 1, 1), nil, nil)
  201. obj.EdgeTopRW = add.Weld(obj.EdgeTopR, obj.HandleBack, CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(90), 0, math.rad(90)))
  202. obj.Blade = add.Part(modelB, false, false, "Mid gray", 0, Vector3.new(0.2, 0.8, 0.2), nil)
  203. obj.BladeM = add.Mesh("BlockMesh", obj.Blade, Vector3.new(0.5, 1, 1), nil, nil)
  204. obj.BladeW = add.Weld(obj.Blade, obj.EdgeTopR, CFrame.new(-0.1, 0, -0.4) * CFrame.Angles(-math.rad(90), math.rad(90), 0))
  205. obj.Point = add.Part(modelB, false, false, "Mid gray", 0, Vector3.new(0.2, 0.4, 0.2), nil)
  206. obj.PointM = add.Mesh("SpecialMesh", obj.Point, Vector3.new(0.5, 1, 0.5), nil, "Wedge")
  207. obj.PointW = add.Weld(obj.Point, obj.Blade, CFrame.new(0, 0.6, 0.05) * CFrame.Angles(0, math.rad(180), 0))
  208. obj.Point2 = add.Part(modelB, false, false, "Mid gray", 0, Vector3.new(0.2, 0.4, 0.2), nil)
  209. obj.Point2M = add.Mesh("SpecialMesh", obj.Point2, Vector3.new(0.5, 1, 0.5), nil, "Wedge")
  210. obj.Point2W = add.Weld(obj.Point2, obj.Blade, CFrame.new(0, 0.6, -0.05))
  211. obj.Joints = add.Part(modelB, false, false, "Medium mid-gray", 0, Vector3.new(0.2, 0.25, 0.2), nil)
  212. obj.JointsM = add.Mesh("CylinderMesh", obj.Joints, Vector3.new(0.5, 1, 0.5), nil, nil)
  213. obj.JointsW = add.Weld(obj.Joints, obj.EdgeBot, nil)
  214. obj.Joints = add.Part(modelB, false, false, "Medium mid-gray", 0, Vector3.new(0.2, 0.25, 0.2), nil)
  215. obj.JointsM = add.Mesh("CylinderMesh", obj.Joints, Vector3.new(0.5, 1, 0.5), nil, nil)
  216. obj.JointsW = add.Weld(obj.Joints, obj.EdgeTopR, nil)
  217. obj.EdgeTopR2 = add.Part(modelB, false, false, "Really black", 0, Vector3.new(0.2, 0.2, 0.2), nil)
  218. obj.EdgeTopR2M = add.Mesh("CylinderMesh", obj.EdgeTopR2, Vector3.new(1, 1, 1), nil, nil)
  219. obj.EdgeTopR2W = add.Weld(obj.EdgeTopR2, obj.Blade, CFrame.new(0, -0.4, -0.1) * CFrame.Angles(math.rad(90), 0, math.rad(90)))
  220. obj.HandleFor = add.Part(modelB, false, false, "Really black", 0, Vector3.new(0.2, 1, 0.2), nil)
  221. obj.HandleForW = add.Weld(obj.HandleFor, obj.EdgeTopR2, CFrame.new(0, 0, 0.5) * CFrame.Angles(-math.rad(90), -math.rad(90), 0))
  222. obj.EdgeBot = add.Part(modelB, false, false, "Really black", 0, Vector3.new(0.2, 0.2, 0.2), nil)
  223. obj.EdgeBotM = add.Mesh("CylinderMesh", obj.EdgeBot, Vector3.new(1, 1, 1), nil, nil)
  224. obj.EdgeBotW = add.Weld(obj.EdgeBot, obj.HandleFor, CFrame.new(0, -0.5, 0) * CFrame.Angles(math.rad(90), 0, math.rad(90)))
  225. obj.Joints = add.Part(modelB, false, false, "Medium mid-gray", 0, Vector3.new(0.2, 0.25, 0.2), nil)
  226. obj.JointsM = add.Mesh("CylinderMesh", obj.Joints, Vector3.new(0.5, 1, 0.5), nil, nil)
  227. obj.JointsW = add.Weld(obj.Joints, obj.EdgeBot, nil)
  228. obj.Joints = add.Part(modelB, false, false, "Medium mid-gray", 0, Vector3.new(0.2, 0.25, 0.2), nil)
  229. obj.JointsM = add.Mesh("CylinderMesh", obj.Joints, Vector3.new(0.5, 1, 0.5), nil, nil)
  230. obj.JointsW = add.Weld(obj.Joints, obj.EdgeTopR2, nil)
  231. end
  232. function removeParts()
  233. p(function()
  234. if torso then
  235. torso["Left Hip"].Part0 = torso
  236. torso["Right Hip"].Part0 = torso
  237. end
  238. for i, v in pairs(model:children()) do
  239. v:remove()
  240. end
  241. for i, v in pairs(modelB:children()) do
  242. v:remove()
  243. end
  244. for i, v in pairs(char:children()) do
  245. v.Transparency = 0
  246. end
  247. end)
  248. end
  249. local trailDeb = false
  250. local using = false
  251. local combo = 1
  252. local onStab = false
  253. local keyDeb = false
  254. local switch = false
  255. local switch2 = false
  256. local keyDeb2 = false
  257. local hitDeb = false
  258. local dmg = math.random(5, 10)
  259. local instakill = 75
  260. local speed = 20
  261. local pitch = 0.8
  262. local crit = add.Sound(torso, "http://www.roblox.com/asset/?id=296102734", 1, 1)
  263. local Slash = add.Sound(torso, "rbxasset://sounds//swordslash.wav", 1, pitch)
  264. local Hit = add.Sound(torso, "http://www.roblox.com/asset/?id=30715280", 1, 1)
  265. local Abscond = add.Sound(torso, "http://www.roblox.com/asset/?id=195575792", 1, 1)
  266. local Equip = add.Sound(torso, "http://www.roblox.com/asset/?id=13510737", 1, 1)
  267. local attackLabel = add.Gui("TextLabel", gui, "Really black", "Really black", "White", "Size18", "Invisible(Q)", 0, UDim2.new(0, 150, 0, 50), UDim2.new(0, 0, 0, 150))
  268. local attackLabel2 = add.Gui("TextLabel", attackLabel, "Really black", "Really black", "White", "Size18", "Disguise(E)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  269. if PlayerGui:findFirstChild("manaGUI", true) ~= nil then
  270. PlayerGui:findFirstChild("manaGUI", true).Parent = nil
  271. end
  272. local fengui = Instance.new("GuiMain")
  273. fengui.Parent = PlayerGui
  274. fengui.Name = "manaGUI"
  275. local fenframe = Instance.new("Frame")
  276. fenframe.Parent = fengui
  277. fenframe.BackgroundColor3 = Color3.new(255, 255, 255)
  278. fenframe.BackgroundTransparency = 1
  279. fenframe.BorderColor3 = Color3.new(17, 17, 17)
  280. fenframe.Position = UDim2.new(0, 0, 0.2, 0)
  281. fenframe.Size = UDim2.new(0.0500000007, 0, 0.100000001, 0)
  282. local fentext = Instance.new("TextLabel")
  283. fentext.Parent = fenframe
  284. fentext.Text = "Energy(" .. mana .. ")"
  285. fentext.BackgroundTransparency = 1
  286. fentext.SizeConstraint = "RelativeXY"
  287. fentext.TextXAlignment = "Center"
  288. fentext.TextYAlignment = "Center"
  289. fentext.Position = UDim2.new(0, 80, 1, 200)
  290. local fentext2 = Instance.new("TextLabel")
  291. fentext2.Parent = fenframe
  292. fentext2.Text = " "
  293. fentext2.BackgroundTransparency = 0
  294. fentext2.BackgroundColor3 = Color3.new(0, 0, 0)
  295. fentext2.SizeConstraint = "RelativeXY"
  296. fentext2.TextXAlignment = "Center"
  297. fentext2.TextYAlignment = "Center"
  298. fentext2.Position = UDim2.new(0, 10, 1, 170)
  299. fentext2.Size = UDim2.new(2.79999995, 0, 0.210000306, 0)
  300. local fentext3 = Instance.new("TextLabel")
  301. fentext3.Parent = fenframe
  302. fentext3.Text = " "
  303. fentext3.BackgroundTransparency = 0
  304. fentext3.BackgroundColor3 = Color3.new(1, 1, 0)
  305. fentext3.SizeConstraint = "RelativeXY"
  306. fentext3.TextXAlignment = "Center"
  307. fentext3.TextYAlignment = "Center"
  308. fentext3.Position = UDim2.new(0, 10, 1, 170)
  309. fentext3.Size = UDim2.new(mana / 100, 0, 0.400000006, 0)
  310. coroutine.resume(coroutine.create(function()
  311. while true do
  312. wait(0.1)
  313. fentext3.Size = UDim2.new(mana / 36, 0, 0.200000006, 0)
  314. fentext.Text = "Cloak..(" .. mana .. "%)"
  315. fentext3.BackgroundColor3 = Color3.new(0, 0, 1)
  316. fentext.TextStrokeTransparency = 0
  317. fentext.TextColor3 = Color3.new(0, 0, 1)
  318. end
  319. end))
  320. function lightningGen(startPos, endPos)
  321. local magnitude = (startPos - endPos).magnitude
  322. local distance = (startPos + endPos) / 2
  323. local pattern = add.Part(workspace, true, false, "White", 1, Vector3.new(0.2, 0.2, magnitude), CFrame.new(distance, startPos))
  324. local startPosProx = startPos
  325. for i = 1, 9 do
  326. do
  327. local startPosProx2 = startPosProx
  328. local random = Vector3.new(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1))
  329. local findSize = pattern.Size.z / 10
  330. local findOffSet = pattern.CFrame.lookVector * -1
  331. local compute = i * findSize * findOffSet
  332. local newStartPos = startPos
  333. local newEndPos = CFrame.new(random + compute + newStartPos).p
  334. local magnitude = (startPosProx2 - newEndPos).magnitude
  335. local distance = (startPosProx2 + newEndPos) / 2
  336. local lightning = add.Part(workspace, true, false, "Bright yellow", 0, Vector3.new(0.2, 0.2, magnitude), CFrame.new(distance, startPosProx2))
  337. c(function()
  338. for i = 0, 1, 0.1 do
  339. wait()
  340. lightning.Transparency = i
  341. end
  342. lightning:remove()
  343. end)
  344. startPosProx = newEndPos
  345. end
  346. end
  347. pattern:remove()
  348. end
  349. function computePos(pos, pos2)
  350. local pos3 = Vector3.new(pos2.x, pos.y, pos2.z)
  351. torso.CFrame = CFrame.new(pos, pos3)
  352. return pos3
  353. end
  354. function nearTorso(pos, dis)
  355. local temp
  356. local distance = dis
  357. for i, v in pairs(workspace:children()) do
  358. if v:isA("Model") then
  359. temp = v:findFirstChild("Torso")
  360. local humanoid = v:findFirstChild("Humanoid")
  361. if temp and humanoid and v ~= char and distance > (temp.CFrame.p - pos).magnitude then
  362. distance = (temp.CFrame.p - pos).magnitude
  363. return temp
  364. end
  365. end
  366. end
  367. end
  368. function trail(pos, cf, col)
  369. c(function()
  370. local old = (pos.CFrame * cf).p
  371. while trailDeb == true do
  372. wait()
  373. do
  374. local new = (pos.CFrame * cf).p
  375. local mag = (old - new).magnitude
  376. local dis = (old + new) / 2
  377. local trail = add.Part(workspace, true, false, col, 0, Vector3.new(0.2, mag, 0.2), CFrame.new(dis, new) * CFrame.Angles(math.pi / 2, 0, 0))
  378. trail.Name = "Trail"
  379. local tMesh = add.Mesh("CylinderMesh", trail, Vector3.new(0.5, 1, 0.5), nil, nil)
  380. old = new
  381. c(function()
  382. for i = 1, 0, -0.1 do
  383. wait()
  384. tMesh.Scale = tMesh.Scale * Vector3.new(i, 1, i)
  385. end
  386. trail:remove()
  387. end)
  388. c(function()
  389. for i = 0, 1, 0.1 do
  390. wait()
  391. trail.Transparency = i
  392. end
  393. end)
  394. end
  395. end
  396. end)
  397. end
  398. function running()
  399. animate.ArmLeft(CFrame.Angles(-math.rad(45), 0, -math.rad(15)))
  400. animate.ArmRight(CFrame.Angles(math.rad(45), 0, math.rad(15)))
  401. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(90), 0, 0)
  402. end
  403. function hit(h)
  404. if using == true and switch == false then
  405. if onStab == false and h.Parent:findFirstChild("Humanoid") and h.Parent ~= char and hitDeb == false then
  406. hitDeb = true
  407. print("NormalStab")
  408. Hit:play()
  409. local hHuman = h.Parent:findFirstChild("Humanoid")
  410. HitHealth = hHuman.Health
  411. hHuman.Health = hHuman.Health - dmg
  412. if HitHealth ~= hHuman.Health and HitHealth ~= 0 and hHuman.Health <= 0 and hHuman.Parent.Name ~= "Lost Soul" then
  413. print("gained spree")
  414. game.Players.LocalPlayer:FindFirstChild("leaderstats").Spree.Value = game.Players.LocalPlayer.leaderstats.Spree.Value + 1
  415. end
  416. local fakeM = Instance.new("Model", workspace)
  417. fakeM.Name = -dmg
  418. local fakeH = Instance.new("Humanoid", fakeM)
  419. fakeH.MaxHealth = 0
  420. fakeH.Health = 0
  421. local effect = add.Part(fakeM, false, false, "Bright red", 0, Vector3.new(1, 1, 1), h.CFrame)
  422. effect.Name = "Head"
  423. local fakeMesh = add.Mesh("CylinderMesh", effect, Vector3.new(1, 0.5, 1), nil, nil)
  424. local bp = Instance.new("BodyPosition", effect)
  425. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  426. bp.position = h.Position + Vector3.new(0, 4, 0)
  427. game.Debris:addItem(fakeM, 2)
  428. wait(1)
  429. hitDeb = false
  430. end
  431. if onStab == true and h.Parent ~= char and h.Parent:findFirstChild("Humanoid") and hitDeb == false then
  432. hitDeb = true
  433. print("NormalStab")
  434. crit:play()
  435. local hHuman = h.Parent:findFirstChild("Humanoid")
  436. hHuman.Health = hHuman.Health - instakill
  437. local fakeM = Instance.new("Model", workspace)
  438. fakeM.Name = "BACKSTABBED"
  439. local fakeH = Instance.new("Humanoid", fakeM)
  440. fakeH.MaxHealth = 0
  441. fakeH.Health = 0
  442. local effect = add.Part(fakeM, false, false, "Bright red", 0, Vector3.new(1, 1, 1), h.CFrame)
  443. effect.Name = "Head"
  444. local fakeMesh = add.Mesh("CylinderMesh", effect, Vector3.new(1, 0.5, 1), nil, nil)
  445. local bp = Instance.new("BodyPosition", effect)
  446. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  447. bp.position = h.Position + Vector3.new(0, 4, 0)
  448. game.Debris:addItem(fakeM, 2)
  449. wait(1)
  450. hitDeb = false
  451. end
  452. end
  453. end
  454. function findStab()
  455. while using == false do
  456. wait()
  457. local nTorso = nearTorso(torso.CFrame.p, 3)
  458. if nTorso then
  459. local offSet = nTorso.CFrame:toObjectSpace(torso.CFrame)
  460. if offSet.z > 0 then
  461. onStab = true
  462. animate.ArmRight(CFrame.Angles(math.rad(135), 0, 0))
  463. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(90), 0, 0)
  464. else
  465. onStab = false
  466. running()
  467. end
  468. else
  469. onStab = false
  470. running()
  471. end
  472. end
  473. end
  474. function attack()
  475. combo = combo + 1
  476. if using == false then
  477. using = true
  478. for i, v in pairs(modelB:children()) do
  479. v.Touched:connect(hit)
  480. end
  481. if combo == 1 and onStab == false then
  482. Slash:play()
  483. for i = 0, 1, 0.2 do
  484. wait()
  485. animate.Torso(CFrame.Angles(0, math.rad(45) * i, 0))
  486. animate.ArmRight(CFrame.Angles(math.rad(90) * i, 0, 0))
  487. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(90), 0, math.rad(45) * i)
  488. end
  489. for i = 1, 0, -0.2 do
  490. wait()
  491. animate.Torso(CFrame.Angles(0, math.rad(45) * i, 0))
  492. animate.ArmRight(CFrame.Angles(math.rad(90) * i, 0, 0))
  493. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(90), 0, math.rad(45) * i)
  494. end
  495. if combo > 1 and onStab == false then
  496. combo = 2
  497. Slash:play()
  498. for i = 0, 1, 0.2 do
  499. wait()
  500. animate.Torso(CFrame.Angles(0, math.rad(45) * i, 0))
  501. animate.ArmRight(CFrame.Angles(math.rad(90) * i, 0, math.rad(45) * i))
  502. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(90 + 90 * i), 0, 0)
  503. end
  504. for i = 1, 0, -0.2 do
  505. wait()
  506. animate.Torso(CFrame.Angles(0, math.rad(45) * i, 0))
  507. animate.ArmRight(CFrame.Angles(math.rad(90) * i, 0, math.rad(45) * i))
  508. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(90 + 90 * i), 0, 0)
  509. end
  510. end
  511. end
  512. if onStab == true then
  513. for i = 0, 1, 0.2 do
  514. wait()
  515. animate.ArmRight(CFrame.Angles(math.rad(135 - 45 * i), 0, 0))
  516. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(90), 0, 0)
  517. end
  518. onStab = false
  519. end
  520. using = false
  521. combo = 0
  522. body.Torso.Transparency = 1
  523. torso.Transparency = 0
  524. running()
  525. findStab()
  526. end
  527. end
  528. function cloakoff()
  529. d = Instance.new("StringValue", player)
  530. d.Name = "CLOAKNFOAK"
  531. game.Debris:AddItem(d, 10)
  532. keyDeb = true
  533. switch = false
  534. using = false
  535. cloakoffd = true
  536. coroutine.resume(coroutine.create(function()
  537. while cloakoffd do
  538. wait()
  539. if mana < 100 then
  540. wait(0.15)
  541. mana = mana + 1
  542. end
  543. end
  544. end))
  545. attackLabel.Text = "Invisible(Q)"
  546. print("2")
  547. Abscond:play()
  548. pcall(function()
  549. char.Sound.Disabled = false
  550. end)
  551. modelB.Parent = char
  552. for i, v in pairs(char:children()) do
  553. c(function()
  554. for i = 1, 0, -0.2 do
  555. wait()
  556. pcall(function()
  557. c(function()
  558. if v.Head ~= nil then
  559. head.Transparency = 1
  560. end
  561. end)
  562. if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
  563. v.Transparency = i
  564. end
  565. end)
  566. pcall(function()
  567. v.Handle.Transparency = i
  568. end)
  569. pcall(function()
  570. v.face.Transparency = i
  571. end)
  572. pcall(function()
  573. v.roblox.Transparency = i
  574. end)
  575. pcall(function()
  576. v.Head.Transparency = i
  577. end)
  578. end
  579. end)
  580. end
  581. for i, v in pairs(modelB:children()) do
  582. c(function()
  583. for i = 1, 0, -0.2 do
  584. wait()
  585. pcall(function()
  586. v.Transparency = i
  587. end)
  588. pcall(function()
  589. v.Handle.Transparency = i
  590. end)
  591. pcall(function()
  592. v.face.Transparency = i
  593. end)
  594. end
  595. end)
  596. end
  597. for i, v in pairs(workspace.CurrentCamera:children()) do
  598. pcall(function()
  599. v:remove()
  600. end)
  601. end
  602. wait(0.5)
  603. keyDeb = false
  604. findStab()
  605. end
  606. bin.Selected:connect(function(mouse)
  607. createParts()
  608. human.WalkSpeed = speed
  609. running()
  610. using = true
  611. Equip:play()
  612. for i = 1, 0, -0.1 do
  613. wait()
  614. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(90), math.rad(180) * i, 0)
  615. obj.EdgeTopRW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(90) + math.rad(180) * i, 0, math.rad(90))
  616. obj.EdgeTopR2W.C1 = CFrame.new(0, -0.4, -0.1) * CFrame.Angles(math.rad(90) + math.rad(180) * i, 0, math.rad(90))
  617. end
  618. using = false
  619. mouse.Button1Down:connect(attack)
  620. mouse.KeyDown:connect(function(key)
  621. local key = key:lower()
  622. if key == "q" and player:FindFirstChild("CLOAKNFOAK") == nil and keyDeb == false and switch == false and cloakoffd == true and using == false then
  623. cloakoffd = false
  624. keyDeb = true
  625. switch = true
  626. using = true
  627. coroutine.resume(coroutine.create(function()
  628. while switch do
  629. wait()
  630. if mana > 2 then
  631. wait(0.25)
  632. mana = mana - 2
  633. if mana <= 2 then
  634. cloakoff()
  635. end
  636. end
  637. end
  638. end))
  639. attackLabel.Text = "Visible(Q)"
  640. print("1")
  641. Abscond:play()
  642. pcall(function()
  643. char.Sound.Disabled = true
  644. end)
  645. for i, v in pairs(char:children()) do
  646. c(function()
  647. for i = 0, 1, 0.2 do
  648. wait()
  649. pcall(function()
  650. c(function()
  651. if v.Head ~= nil then
  652. head.Transparency = 1
  653. end
  654. end)
  655. if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
  656. v.Transparency = i
  657. end
  658. end)
  659. pcall(function()
  660. v.Handle.Transparency = i
  661. end)
  662. pcall(function()
  663. v.face.Transparency = i
  664. end)
  665. pcall(function()
  666. v.roblox.Transparency = i
  667. end)
  668. pcall(function()
  669. v.Head.Transparency = i
  670. end)
  671. end
  672. end)
  673. end
  674. for i, v in pairs(modelB:children()) do
  675. c(function()
  676. for i = 0, 1, 0.2 do
  677. wait()
  678. pcall(function()
  679. if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
  680. v.Transparency = i
  681. end
  682. end)
  683. pcall(function()
  684. v.Handle.Transparency = i
  685. end)
  686. pcall(function()
  687. v.face.Transparency = i
  688. end)
  689. end
  690. end)
  691. end
  692. wait(0.5)
  693. local fakeModel = Instance.new("Model", workspace.CurrentCamera)
  694. fakeModel.Name = "YOU"
  695. local fakeHumanoid = Instance.new("Humanoid", fakeModel)
  696. fakeHumanoid.Health = 0
  697. fakeHumanoid.MaxHealth = 0
  698. local fakeHead = add.Part(fakeModel, false, false, "Bright green", 0, Vector3.new(1, 1, 1), nil)
  699. fakeHead.Name = "Head"
  700. local fakeHeadM = add.Mesh("SpecialMesh", fakeHead, Vector3.new(1, 1.5, 1), nil, "File")
  701. fakeHeadM.MeshId = "http://www.roblox.com/Asset/?id=9756362"
  702. local fakeHeadW = add.Weld(fakeHead, torso, CFrame.new(0, 1.5, 0))
  703. modelB.Parent = workspace.CurrentCamera
  704. for i, v in pairs(modelB:children()) do
  705. c(function()
  706. for i = 0, 1, 0.2 do
  707. swait()
  708. pcall(function()
  709. v.Transparency = 0.5
  710. end)
  711. pcall(function()
  712. v.Handle.Transparency = 0.5
  713. end)
  714. pcall(function()
  715. v.face.Transparency = 0.5
  716. end)
  717. end
  718. end)
  719. end
  720. keyDeb = false
  721. elseif key == "q" and keyDeb == false and switch == true and cloakoffd == false and using == true then
  722. cloakoffd = true
  723. keyDeb = true
  724. switch = false
  725. using = false
  726. d = Instance.new("StringValue", player)
  727. d.Name = "CLOAKNFOAK"
  728. game.Debris:AddItem(d, 3)
  729. coroutine.resume(coroutine.create(function()
  730. while cloakoffd do
  731. wait()
  732. if mana < 100 then
  733. wait(0.1555)
  734. mana = mana + 1
  735. end
  736. end
  737. end))
  738. attackLabel.Text = "Invisible(Q)"
  739. print("2")
  740. Abscond:play()
  741. pcall(function()
  742. char.Sound.Disabled = false
  743. end)
  744. modelB.Parent = char
  745. for i, v in pairs(char:children()) do
  746. c(function()
  747. for i = 1, 0, -0.2 do
  748. wait()
  749. pcall(function()
  750. c(function()
  751. if v.Head ~= nil then
  752. head.Transparency = 1
  753. end
  754. end)
  755. if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
  756. v.Transparency = i
  757. end
  758. end)
  759. pcall(function()
  760. v.Handle.Transparency = i
  761. end)
  762. pcall(function()
  763. v.face.Transparency = i
  764. end)
  765. pcall(function()
  766. v.roblox.Transparency = i
  767. end)
  768. pcall(function()
  769. v.Head.Transparency = i
  770. end)
  771. end
  772. end)
  773. end
  774. for i, v in pairs(modelB:children()) do
  775. c(function()
  776. for i = 1, 0, -0.2 do
  777. wait()
  778. pcall(function()
  779. v.Transparency = i
  780. end)
  781. pcall(function()
  782. v.Handle.Transparency = i
  783. end)
  784. pcall(function()
  785. v.face.Transparency = i
  786. end)
  787. end
  788. end)
  789. end
  790. for i, v in pairs(workspace.CurrentCamera:children()) do
  791. pcall(function()
  792. v:remove()
  793. end)
  794. end
  795. wait(0.5)
  796. keyDeb = false
  797. findStab()
  798. end
  799. local xSpace = 0
  800. if key == "e" and keyDeb2 == false and switch2 == false then
  801. keyDeb2 = true
  802. switch2 = true
  803. attackLabel2.Text = "Menu:"
  804. for i, v in pairs(game.Players:children()) do
  805. if v ~= player then
  806. xSpace = xSpace + 1
  807. do
  808. local playersLabel = add.Gui("TextButton", attackLabel2, "Really black", "Really black", "Bright red", "Size18", v.Name, 0, UDim2.new(1, 0, 1, 0), UDim2.new(xSpace, 0, 0, 0))
  809. playersLabel.MouseButton1Click:connect(function()
  810. Abscond:play()
  811. pcall(function()
  812. for i, v in pairs(char:children()) do
  813. pcall(function()
  814. v.face:remove()
  815. end)
  816. pcall(function()
  817. v.roblox:remove()
  818. end)
  819. pcall(function()
  820. v.Head:remove()
  821. end)
  822. if v:IsA("BodyColors") then
  823. v:remove()
  824. end
  825. if v:IsA("Hat") then
  826. v:remove()
  827. end
  828. if v:IsA("ShirtGraphic") then
  829. v:remove()
  830. end
  831. if v:IsA("Pants") then
  832. v:remove()
  833. end
  834. if v:IsA("Shirt") then
  835. v:remove()
  836. end
  837. if v:IsA("CharacterMesh") then
  838. v:remove()
  839. end
  840. if v:IsA("BodyColors") then
  841. v:remove()
  842. end
  843. end
  844. for i, v in pairs(game.Players[playersLabel.Text].Character:children()) do
  845. pcall(function()
  846. local cloned = v.face:clone()
  847. cloned.Parent = head
  848. if switch == true then
  849. pcall(function()
  850. cloned.Transparency = 1
  851. end)
  852. end
  853. end)
  854. pcall(function()
  855. v.roblox:clone().Parent = torso
  856. end)
  857. if v:IsA("BodyColors") then
  858. v:clone().Parent = char
  859. end
  860. if v:IsA("Hat") then
  861. do
  862. local cloned = v:clone()
  863. cloned.Parent = char
  864. if switch == true then
  865. pcall(function()
  866. cloned.Handle.Transparency = 1
  867. end)
  868. end
  869. end
  870. end
  871. if v:IsA("ShirtGraphic") then
  872. v:clone().Parent = char
  873. end
  874. if v:IsA("Pants") then
  875. v:clone().Parent = char
  876. end
  877. if v:IsA("Shirt") then
  878. v:clone().Parent = char
  879. end
  880. if v:IsA("CharacterMesh") then
  881. v:clone().Parent = char
  882. end
  883. if v:IsA("BodyColors") then
  884. v:clone().Parent = char
  885. end
  886. end
  887. head.Transparency = 1
  888. local fakeModel = Instance.new("Model", char)
  889. fakeModel.Name = playersLabel.Text
  890. local fakeHumanoid = Instance.new("Humanoid", fakeModel)
  891. fakeHumanoid.Health = 100
  892. fakeHumanoid.MaxHealth = 100
  893. local fakeHead = add.Part(fakeModel, false, false, game.Players[playersLabel.Text].Character.Head.Color, 0, Vector3.new(1, 1, 1), nil)
  894. fakeHead.Name = "Head"
  895. if switch == true then
  896. fakeHead.Transparency = 1
  897. end
  898. local fakeHeadM = add.Mesh("SpecialMesh", fakeHead, Vector3.new(1.25, 1.25, 1.25), nil, "Head")
  899. local fakeHeadW = add.Weld(fakeHead, torso, CFrame.new(0, 1.5, 0))
  900. end)
  901. end)
  902. end
  903. end
  904. end
  905. keyDeb2 = false
  906. elseif key == "e" and keyDeb2 == false and switch2 == true then
  907. keyDeb2 = true
  908. switch2 = false
  909. attackLabel2.Text = "Disguise(E)"
  910. for i, v in pairs(attackLabel2:children()) do
  911. pcall(function()
  912. v:remove()
  913. end)
  914. end
  915. keyDeb2 = false
  916. end
  917. end)
  918. findStab()
  919. end)
  920. bin.Deselected:connect(function()
  921. Equip:play()
  922. for i = 0, 1, 0.1 do
  923. wait()
  924. obj.HandleBackW.C1 = CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(90), math.rad(180) * i, 0)
  925. obj.EdgeTopRW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(90) + math.rad(180) * i, 0, math.rad(90))
  926. obj.EdgeTopR2W.C1 = CFrame.new(0, -0.4, -0.1) * CFrame.Angles(math.rad(90) + math.rad(180) * i, 0, math.rad(90))
  927. end
  928. switch2 = false
  929. using = false
  930. for i, v in pairs(attackLabel2:children()) do
  931. pcall(function()
  932. v:remove()
  933. end)
  934. end
  935. removeParts()
  936. end)
  937. while true do
  938. wait()
  939. if cloakoffd == false and mana <= 2 then
  940. cloakoff()
  941. end
  942. end
Add Comment
Please, Sign In to add comment