Roblox_Xploits

Dual blades good to use w/ cape

Aug 25th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.89 KB | None | 0 0
  1. -- mediafire
  2. for i,v in pairs(script:GetChildren()) do
  3. pcall(function() v.Value = "" end)
  4. v:Destroy()
  5. end
  6. function weld(p0,p1,c0,c1,par)
  7. local w = Instance.new("Weld",p0 or par)
  8. w.Part0 = p0
  9. w.Part1 = p1
  10. w.C0 = c0 or CFrame.new()
  11. w.C1 = c1 or CFrame.new()
  12. return w
  13. end
  14. function lerp(a,b,c)
  15. return a+(b-a)*c
  16. end
  17. --[[
  18. function clerp(c1,c2,al)
  19. local com1 = {c1:components()}
  20. local com2 = {c2:components()}
  21. for i,v in pairs(com1) do
  22. com1[i] = lerp(v,com2[i],al)
  23. end
  24. return CFrame.new(unpack(com1))
  25. end]]
  26. do
  27. local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end
  28.  
  29. local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end
  30.  
  31. local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end
  32. function clerp(a,b,t)
  33. local qa = {QuaternionFromCFrame(a)}
  34. local qb = {QuaternionFromCFrame(b)}
  35. local ax, ay, az = a.x, a.y, a.z
  36. local bx, by, bz = b.x, b.y, b.z
  37. local _t = 1-t
  38. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  39. end
  40. end
  41. function tickwave(time,length,offset)
  42. return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length
  43. end
  44. function invcol(c)
  45. c = c.Color
  46. return BrickColor.new(Color3.new(1-c.r,1-c.g,1-c.b))
  47. end
  48. function playSound(id,parent,volume,pitch)
  49. local sound = Instance.new("Sound",parent or workspace)
  50. sound.SoundId = type(id) == "string" and id or "rbxassetid://"..id
  51. sound.Volume = volume or 1
  52. sound.Pitch = pitch or 1
  53. Spawn(function()
  54. wait(1/30)
  55. sound:Play()
  56. wait(10)
  57. sound:Stop()
  58. sound:Destroy()
  59. end)
  60. end
  61. local oc = oc or function(...) return ... end
  62. local players = game:GetService("Players")
  63. local debris = game:GetService("Debris")
  64. local run = game:GetService("RunService")
  65. local plr = players.LocalPlayer
  66. local mouse = plr:GetMouse()
  67. local char = plr.Character
  68. local mpar = char
  69. local name = "DSwords"
  70. pcall(function() plr.Backpack[name]:Destroy() end)
  71. pcall(function() mpar[name]:Destroy() end)
  72. pcall(function() workspace.CurrentCamera[name]:Destroy() end)
  73. wait(.05)
  74. local tor,ra,la,rl,ll,hd,hum = char.Torso,char["Right Arm"],char["Left Arm"],char["Right Leg"],char["Left Leg"],char.Head,char.Humanoid
  75. local basewalk = 22
  76. local rrs,rls,nk = tor["Right Shoulder"],tor["Left Shoulder"],tor.Neck
  77. local nk0 = nk.C0
  78. local rc0,rc1 = rrs.C0,rrs.C1
  79. local lc0,lc1 = rls.C0,rls.C0
  80. local rs,ls = rrs:Clone(),rls:Clone()
  81. rs.Name,ls.Name = "rs","ls"
  82. local bin = Instance.new("HopperBin",plr.Backpack)
  83. bin.Name = name
  84. local model = Instance.new("Model",mpar)
  85. local t = {}
  86. local cmodel = Instance.new("Model",workspace.CurrentCamera)
  87. cmodel.Name = name
  88. model.ChildAdded:connect(function(c)
  89. wait(.05)
  90. local b = c:Clone()
  91. b.Parent = cmodel
  92. b:BreakJoints()
  93. if not b.Anchored then
  94. weld(c,b)
  95. end
  96. t[c] = {b,c.Changed:connect(function(o)
  97. if o == "Transparency" or o == "Reflectance" or o == "BrickColor" then
  98. b[o] = c[o]
  99. end
  100. end)}
  101. end)
  102. model.ChildRemoved:connect(function(c)
  103. ypcall(function()
  104. t[c][2]:disconnect()
  105. t[c][1]:Destroy()
  106. end)
  107. end)
  108. model.Name = name
  109. char.archivable = true
  110. local fpa = char:Clone()
  111. fpa:BreakJoints()
  112. fpa.Humanoid.Health = 0
  113. char.archivable = false
  114. wait(.05)
  115. fpa.Name = ""
  116. for i,v in pairs(fpa:GetChildren()) do
  117. if v:IsA("BasePart") then
  118. v:BreakJoints()
  119. v.Anchored = true
  120. v.CFrame = CFrame.new(10000,10000,0)
  121. elseif v:IsA("Script") or v:IsA("Hat") then
  122. v:Destroy()
  123. end
  124. end
  125. fpa.Parent = workspace.CurrentCamera
  126. fpa:BreakJoints()
  127. local fra,fla = fpa["Right Arm"],fpa["Left Arm"]
  128. fra.Anchored = false
  129. fla.Anchored = false
  130. weld(ra,fra)
  131. weld(la,fla)
  132. local part = Instance.new("Part")
  133. part.FormFactor = "Custom"
  134. part.TopSurface,part.BottomSurface = 0,0
  135. part.Size = Vector3.new(.2,.2,.2)
  136. part:BreakJoints()
  137. part.CanCollide = false
  138. function clone(t)
  139. local p = t:Clone()
  140. p.Parent = t.Parent or model
  141. return p
  142. end
  143. local cons = {}
  144. function con(a)
  145. if runend then pcall(function() a:disconnect() end) return end
  146. table.insert(cons,a)
  147. return a
  148. end
  149. local slen = 4.5
  150. local r_gem = clone(part)
  151. r_gem.Size = Vector3.new(.3,.3,.2)
  152. r_gem.BrickColor = BrickColor.Red()
  153. local m = Instance.new("BlockMesh",r_gem)
  154. m.Scale = Vector3.new(1,1,.5)
  155. weld(ra,r_gem,CFrame.new(0,-.6,-.5))
  156. local r_a1 = clone(part)
  157. r_a1.Size = Vector3.new(.2,.5,.2)
  158. r_a1.BrickColor = BrickColor.new("Royal purple")
  159. r_a1.Reflectance = .2
  160. local m = Instance.new("BlockMesh",r_a1)
  161. m.Scale = Vector3.new(.25,.8,.25)
  162. weld(r_gem,r_a1,CFrame.new(.05,-.275,0))
  163. local r_a2 = clone(r_a1)
  164. weld(r_gem,r_a2,CFrame.new(-.05,-.275,0))
  165. local r_b1 = clone(r_a1)
  166. r_b1.Size = Vector3.new(.2,.6,1)
  167. local m = r_b1.Mesh
  168. m.Scale = Vector3.new(.75,.25,1)
  169. weld(r_gem,r_b1,CFrame.new(0,-.475,.475))
  170. local r_bl1 = clone(part)
  171. r_bl1.Transparency = .5
  172. r_bl1.Size = Vector3.new(.2,5.8,.5)
  173. local m = Instance.new("SpecialMesh",r_bl1)
  174. m.MeshId = "rbxassetid://70988954"
  175. m.TextureId = "rbxassetid://103972499"
  176. m.VertexColor = Vector3.new(1,1,1)*1
  177. m.Scale = Vector3.new(1,1,1)*.675
  178. weld(r_gem,r_bl1,CFrame.new(0,-.19,-1.5)*CFrame.Angles(math.rad(-90),0,0))
  179. local l_gem = clone(part)
  180. l_gem.Size = Vector3.new(.3,.3,.2)
  181. l_gem.BrickColor = BrickColor.Red()
  182. local m = Instance.new("BlockMesh",l_gem)
  183. m.Scale = Vector3.new(1,1,.5)
  184. weld(la,l_gem,CFrame.new(0,-.6,-.5))
  185. local l_a1 = clone(part)
  186. l_a1.Size = Vector3.new(.2,.5,.2)
  187. l_a1.BrickColor = BrickColor.new("Royal purple")
  188. l_a1.Reflectance = .2
  189. local m = Instance.new("BlockMesh",l_a1)
  190. m.Scale = Vector3.new(.25,.8,.25)
  191. weld(l_gem,l_a1,CFrame.new(.05,-.275,0))
  192. local l_a2 = clone(l_a1)
  193. weld(l_gem,l_a2,CFrame.new(-.05,-.275,0))
  194. local l_b1 = clone(l_a1)
  195. l_b1.Size = Vector3.new(.2,.6,1)
  196. local m = l_b1.Mesh
  197. m.Scale = Vector3.new(.75,.25,1)
  198. weld(l_gem,l_b1,CFrame.new(0,-.475,.475))
  199. local l_bl1 = clone(part)
  200. l_bl1.Transparency = .5
  201. l_bl1.Size = Vector3.new(.2,5.8,.5) -- 2.5
  202. local m = Instance.new("SpecialMesh",l_bl1)
  203. m.MeshId = "rbxassetid://70988954"
  204. m.TextureId = "rbxassetid://103972499"
  205. m.VertexColor = Vector3.new(1,1,1)*1
  206. m.Scale = Vector3.new(1,1,1)*.675
  207. weld(l_gem,l_bl1,CFrame.new(0,-.19,-1.5)*CFrame.Angles(math.rad(-90),0,0))
  208. local seltime = 0
  209. con(bin.Selected:connect(function()
  210. sel = true
  211. seltime = tick()
  212. rs.DesiredAngle,ls.DesiredAngle = 0,0
  213. rs.CurrentAngle,ls.CurrentAngle = rrs.CurrentAngle,rls.CurrentAngle
  214. rrs.Part0,rls.Part0 = nil,nil
  215. rrs.Part1,rls.Part1 = nil,nil
  216. rs.Parent,ls.Parent = tor,tor
  217. rs.Part0,ls.Part0 = tor,tor
  218. rs.Part1,ls.Part1 = ra,la
  219. hum.WalkSpeed = basewalk
  220. end))
  221. con(bin.Deselected:connect(function()
  222. sel = false
  223. seltime = tick()
  224. rs.Part0,ls.Part0 = nil,nil
  225. rs.Part1,ls.Part1 = nil,nil
  226. rrs.CurrentAngle,rls.CurrentAngle = rs.CurrentAngle,ls.CurrentAngle
  227. rrs.Parent,rls.Parent = tor,tor
  228. rrs.Part0,rls.Part0 = tor,tor
  229. rrs.Part1,rls.Part1 = ra,la
  230. nk.C0 = nk0
  231. block = false
  232. hum.WalkSpeed = 16
  233. end))
  234. con(mouse.Button1Down:connect(function()
  235. b1down = tick()
  236. end))
  237. local kd = {}
  238. con(mouse.KeyDown:connect(function(k)
  239. kd[k] = tick()
  240. end))
  241. con(mouse.KeyUp:connect(function(k)
  242. kd[k] = nil
  243. end))
  244. function charNotificator(tar,text,col)
  245. if not tar then print("No tar") return end
  246. local c = tar.CFrame
  247. local m = Instance.new("Model",workspace)
  248. m.Name = text
  249. local h = Instance.new("Humanoid",m)
  250. h.MaxHealth = 0
  251. h.Name = "H"
  252. local p = part:Clone()
  253. p.Name = "Head"
  254. p.Parent = m
  255. p.Anchored = true
  256. p:BreakJoints()
  257. p.BrickColor = col
  258. p.CanCollide = false
  259. Instance.new("BlockMesh",p)
  260. p.Size = Vector3.new(.6,.2,.6)
  261. p.CFrame = CFrame.new(c.p) * CFrame.new((math.random()-.5)*2,2,(math.random()-.5)*2) * CFrame.Angles(0,math.pi,0)
  262. game:GetService("Debris"):AddItem(p,5)
  263. Spawn(function()
  264. for i=1,math.random(60,160) do
  265. p.CFrame = p.CFrame * CFrame.new(0,math.random()*0.08,0)
  266. wait(1/60)
  267. end
  268. m:Destroy()
  269. end)
  270. end
  271. b1down = 0
  272. local ran = math.random()
  273. local cam = workspace.CurrentCamera
  274. local t,r,l = CFrame.new(),CFrame.new(),CFrame.new()
  275. local blo = CFrame.new(0,2.84,0.16)
  276. local lb,rb = l_bl1.CFrame*blo,r_bl1.CFrame*blo
  277. con(run.Stepped:connect(oc(function()
  278. if not model:IsDescendantOf(workspace) then
  279. runend = true
  280. for i,v in pairs(cons) do
  281. pcall(function() v:disconnect() end)
  282. end
  283. rs:Destroy()
  284. ls:Destroy()
  285. nk.C0 = nk0
  286. fpa:Destroy()
  287. bin:Destroy()
  288. cmodel:Destroy()
  289. model:Destroy()
  290. end
  291. r_bl1.Transparency = sel and math.max(.5-(tick()-seltime),0)+(.1 + tickwave(1,.19,ran)) or math.min(math.max(r_bl1.Transparency/2,(tick()-seltime)),.5)*2
  292. r_gem.Reflectance = .5+tickwave(1.5,.5)
  293. r_gem.BrickColor = sel and BrickColor.Green() or BrickColor.Red()
  294. l_bl1.Transparency = sel and math.max(.5-(tick()-seltime),0)+(.1 + tickwave(1,.19,1-ran)) or math.min(math.max(l_bl1.Transparency/2,(tick()-seltime)),.5)*2
  295. l_gem.Reflectance = .5+tickwave(1.5,.5)
  296. l_gem.BrickColor = sel and BrickColor.Green() or BrickColor.Red()
  297. local cf = workspace.CurrentCamera.CoordinateFrame
  298. local fp = (cf.p-hd.Position).magnitude < 2
  299. fra.Transparency = fp and 0 or 1
  300. fla.Transparency = fra.Transparency
  301. local trail = sel and (ad1)
  302. local nr,nl = r_bl1.CFrame*blo,l_bl1.CFrame*blo
  303. if trail then
  304. --if (nr.p-rb.p).magnitude > .05 then
  305. local p = part:Clone()
  306. p.Parent = workspace
  307. p.BrickColor = BrickColor.new("Institutional white")
  308. p.Transparency = .6
  309. p.Anchored = true
  310. p:BreakJoints()
  311. p.Size = Vector3.new(.2,.2,(nr.p-rb.p).magnitude)
  312. p.CFrame = CFrame.new(nr.p:Lerp(rb.p,.5),nr.p) * CFrame.new(0,100,0)
  313. local m = Instance.new("BlockMesh",p)
  314. m.Scale = Vector3.new(.15,.15,1)
  315. m.Offset = Vector3.new(0,-100,0)
  316. Delay(.5,function()
  317. for i=.6,1,.05 do
  318. p.Transparency = i
  319. wait(1/60)
  320. end
  321. p:Destroy()
  322. end)
  323. --end
  324. --if (nl.p-lb.p).magnitude > .05 then
  325. local p = part:Clone()
  326. p.Parent = workspace
  327. p.BrickColor = BrickColor.new("Institutional white")
  328. p.Transparency = .6
  329. p.Anchored = true
  330. p:BreakJoints()
  331. p.Size = Vector3.new(.2,.2,(nl.p-lb.p).magnitude)
  332. p.CFrame = CFrame.new(nl.p:Lerp(lb.p,.5),nl.p) * CFrame.new(0,100,0)
  333. local m = Instance.new("BlockMesh",p)
  334. m.Scale = Vector3.new(.15,.15,1)
  335. m.Offset = Vector3.new(0,-100,0)
  336. Delay(.5,function()
  337. for i=.6,1,.05 do
  338. p.Transparency = i
  339. wait(1/60)
  340. end
  341. p:Destroy()
  342. end)
  343. --end
  344. end
  345. lb,rb = nl,nr
  346. if sel then
  347. nk.C0 = clerp(nk.C0,nk0 * CFrame.Angles(0,0,(sel and not block) and .1 or 0),.2)
  348. local wc = CFrame.new(tor.Position,tor.Position+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1))
  349. tor.CFrame = clerp(wc,wc * CFrame.Angles(0,math.rad(not block and -15 or 0),0) * t,.6)
  350. if (block and not kd["0"]) or (char:FindFirstChild("Block") and (char.Block.Value <= 0 or not block)) then
  351. block = false
  352. br = tick() -(char:FindFirstChild("Block") and char.Block.Value >= 0 and .6*char.Block.Value or 0)
  353. pcall(function() char.Block:Destroy() end)
  354. r = CFrame.new()
  355. l = CFrame.new()
  356. hum.WalkSpeed = basewalk
  357. end
  358. if ((kd["0"] and not ad1)) and tick()-(br or 0) > 1.5 then
  359. if not block then block = tick() end
  360. hum.WalkSpeed = math.max(6,basewalk-10)
  361. r = CFrame.Angles(math.rad(-23),math.rad(0),math.rad(30))*CFrame.Angles(math.rad(10),math.rad(10),0)
  362. l = CFrame.Angles(math.rad(-20),math.rad(0),math.rad(-30))*CFrame.Angles(math.rad(10),math.rad(-10),0)
  363. if not char:FindFirstChild("Block") then
  364. local b = Instance.new("NumberValue",char)
  365. b.Name = "Block"
  366. b.Value = 4
  367. end
  368. end
  369. end
  370. if sel and tick()-b1down < 0.05 and not ad1 and not block then
  371. ad1 = true
  372. Spawn(function()
  373. hum.WalkSpeed = basewalk+5
  374. local rd,ld = {},{}
  375. local hf = function(d,hit)
  376. if tick()-(d[hit.Parent] or 0) < 0.05 then return end
  377. local s = hit.Parent:FindFirstChild("Block")
  378. local h = hit.Parent:FindFirstChild("Humanoid")
  379. if not h then return end
  380. d[hit.Parent] = tick()
  381. if s and s:IsA("NumberValue") and s.Value > 0 then
  382. s.Value = s.Value - 1
  383. charNotificator(hit.Parent:FindFirstChild("Head"),"BLOCK!",BrickColor.Blue())
  384. else
  385. local crit = math.random(1,25) == 4
  386. local dmg = math.ceil((math.random(2,8))*(crit and 2 or 1))
  387. h.Health = h.Health - dmg
  388. charNotificator(hit.Parent:FindFirstChild("Head"),(crit and "!"..dmg.."!" or dmg),crit and BrickColor.Yellow() or BrickColor.Red())
  389. end
  390. end
  391. local c1,c2 = con(r_bl1.Touched:connect(function(h) hf(rd,h) end)),con(l_bl1.Touched:connect(function(h) hf(ld,h) end))
  392. local w8 = .03
  393. Spawn(function()
  394. playSound("http://roblox.com/asset/?id=10209850",r_bl1,1,1)
  395. wait(1/25)
  396. playSound("http://roblox.com/asset/?id=10209850",l_bl1,1,1)
  397. wait(1/25)
  398. playSound("http://roblox.com/asset/?id=10209850",r_bl1,1,1)
  399. end)
  400. wait(w8)
  401. t = CFrame.Angles(0,math.rad(30),0)
  402. r = CFrame.Angles(math.rad(90),math.rad(0),math.rad(50))
  403. wait(w8)
  404. r = CFrame.Angles(math.rad(90),math.rad(0),math.rad(70))
  405. t = CFrame.Angles(0,math.rad(70),0)
  406. l = CFrame.Angles(0,0,math.rad(-40))
  407. wait(w8)
  408. r = CFrame.Angles(math.rad(-10),math.rad(10),math.rad(110))
  409. t = CFrame.Angles(0,math.rad(130),0)
  410. l = CFrame.Angles(0,0,math.rad(-120))
  411. wait(w8)
  412. r = CFrame.Angles(math.rad(-20),math.rad(10),math.rad(10))
  413. t = CFrame.Angles(0,math.rad(240),0)
  414. l = CFrame.Angles(0,0,math.rad(-80))
  415. wait(w8)
  416. l = CFrame.Angles(math.rad(-20),0,math.rad(10))
  417. t = CFrame.Angles(0,math.rad(290),0)
  418. wait(w8)
  419. l = CFrame.Angles(math.rad(-20),0,math.rad(80))
  420. t = CFrame.Angles(0,math.rad(320),0)
  421. wait(w8)
  422. t = CFrame.Angles(0,math.rad(360),0)
  423. wait(.1)
  424. c1:disconnect()
  425. c2:disconnect()
  426. t = CFrame.new()
  427. r = CFrame.new()
  428. l = CFrame.new()
  429. ad1 = false
  430. hum.WalkSpeed = basewalk
  431. end)
  432. end
  433. local wav1 = tickwave(3,4)
  434. local lvy = cam.CoordinateFrame.lookVector.Y
  435. rs.C0 = clerp(rs.C0,rc0 * CFrame.Angles(0,0,math.rad(45)*lvy) * (not sel and CFrame.new() or block and r or CFrame.new() * CFrame.Angles(math.rad(-20 + wav1),math.rad(10 + wav1),math.rad(-15 + wav1))) * r,.45)
  436. ls.C0 = clerp(ls.C0,lc0 * CFrame.Angles(0,0,math.rad(-45)*lvy) * (not sel and CFrame.new() or block and l or CFrame.new() * CFrame.Angles(math.rad(-20 + wav1),math.rad(10 + wav1),math.rad(-25 + wav1))) * l,.45)
  437. end)))
Add Comment
Please, Sign In to add comment