Advertisement
colddddda

Untitled

Jun 21st, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.44 KB | None | 0 0
  1. ply = script.Parent.Parent
  2. char = ply.Character
  3. torso = char.Torso
  4. rs = torso["Right Shoulder"]
  5. rarm = char["Right Arm"]
  6. rw = Instance.new("Weld")
  7. attacking = false
  8.  
  9. function lock(a)
  10. if a == 1 then
  11. rw.Parent = torso
  12. rw.C0,rw.C1 = rs.C0,rs.C1
  13. rw.Part0,rw.Part1 = rs.Part0,rs.Part1
  14. rs.Parent = nil
  15. elseif a == 0 then
  16. rs.Parent = torso
  17. rw.Parent = nil
  18. end
  19. end
  20.  
  21. function infect(hit)
  22. for i,v in pairs(hit.Parent:GetChildren()) do
  23. if v:IsA("Humanoid") then
  24. if v:FindFirstChild("poison") == nil then
  25. Instance.new("BoolValue",v).Name = "poison"
  26.  
  27. coroutine.resume(coroutine.create(function()
  28. for i = 1,30 do
  29. wait()
  30. v.Health = v.Health - 1
  31.  
  32. local c = p1:Clone()
  33. c.Parent = m
  34. c.Size = Vector3.new(0.5,0.5,0.5)
  35. c.CFrame = v.Torso.CFrame + Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3))
  36. c.Anchored = true
  37. c.Transparency = 0.5
  38. c.Color = Color3.new(0,0.3,0)
  39.  
  40. delay(0.1,function()
  41. for i = 0.5,1,0.05 do
  42. wait()
  43. c.Transparency = i
  44. end
  45. c:Remove()
  46. end)
  47.  
  48. end
  49. v:FindFirstChild("poison"):Remove()
  50. end))
  51.  
  52. end
  53. end
  54. end
  55. end
  56.  
  57.  
  58. function damage(hit)
  59. for i,v in pairs(hit.Parent:GetChildren()) do
  60. if v:IsA("Humanoid") then
  61. v.Health = v.Health - 0.5
  62. end
  63. end
  64. end
  65.  
  66. ---WEP START---
  67. m = Instance.new("Model",char)
  68.  
  69. hdl = Instance.new("Part",m)
  70. hdl.TopSurface,hdl.BottomSurface = 0,0
  71. hdl.formFactor = "Custom"
  72. hdl.CanCollide = false
  73. hdl.Size = Vector3.new(0.3,1.5,0.3)
  74.  
  75. p1 = hdl:Clone()
  76. p1.Parent = m
  77. p1.Size = Vector3.new(1,4,0.2)
  78. p1.Color = Color3.new(0.2,0.2,0.2)
  79.  
  80. w = Instance.new("Weld",m)
  81. w.Part0,w.Part1 = p1,hdl
  82. w.C1 = CFrame.new(0,hdl.Size.y/2+p1.Size.y/2-0.05,0)
  83.  
  84. for i = -p1.Size.y/2,p1.Size.y/2,0.25 do
  85. c = Instance.new("WedgePart",m)
  86. c.TopSurface,c.BottomSurface = 0,0
  87. c.formFactor = "Custom"
  88. c.Parent = m
  89. c.Size = Vector3.new(0.1,0.1,0.2)
  90. c.BrickColor = BrickColor.new("Royal purple")
  91.  
  92. w = Instance.new("Weld",m)
  93. w.Part0,w.Part1 = c,p1
  94. w.C1 = CFrame.new(-p1.Size.x/2-c.Size.x/2+0.05,i*0.95,0) * CFrame.Angles(0,math.pi/2,0)
  95. end
  96.  
  97.  
  98. p2 = Instance.new("WedgePart",m)
  99. p2.TopSurface,p2.BottomSurface = 0,0
  100. p2.formFactor = "Custom"
  101. p2.Size = Vector3.new(0.2,1,2)
  102. p2.Color = p1.Color
  103.  
  104. w = Instance.new("Weld",m)
  105. w.Part0,w.Part1 = p2,p1
  106. w.C1 = CFrame.new(0,p1.Size.y/2+p2.Size.z/2-0.05,0) * CFrame.Angles(math.pi/2,0,math.pi/2)
  107.  
  108. for i = -p2.Size.z/2+0.25,p2.Size.z/2-0.25,0.2 do
  109. if i ~= 2 then
  110.  
  111. c = Instance.new("WedgePart",m)
  112. c.TopSurface,c.BottomSurface = 0,0
  113. c.formFactor = "Custom"
  114. c.Parent = m
  115. c.Size = Vector3.new(0.2,0.1,0.2)
  116. c.BrickColor = BrickColor.new("Royal purple")
  117.  
  118. w = Instance.new("Weld",m)
  119. w.Part0,w.Part1 = c,p2
  120. w.C1 = CFrame.new(0,i/2+0.2,i+0.18) * CFrame.Angles(math.pi/2-math.rad(22),0,0)
  121.  
  122. end
  123. end
  124.  
  125. hw = Instance.new("Weld",m)
  126. hw.Part0,hw.Part1 = hdl,rarm
  127. hw.Name = "hw"
  128. hw.C1 = CFrame.new(0,-rarm.Size.y/2-0.15,0) * CFrame.Angles(math.pi/2,-math.pi/2,math.pi)
  129.  
  130. for i,v in pairs(m:GetChildren()) do
  131. if v:IsA("BasePart") and v ~= hdl then
  132. v.Touched:connect(damage)
  133. v.Touched:connect(infect)
  134. end
  135. end
  136.  
  137. hdl.Name = "Handle"
  138. ---WEP END---
  139.  
  140. h = Instance.new("HopperBin",ply.Backpack)
  141. h.Name = "Sword"
  142.  
  143. s = 20
  144.  
  145. function ang(x,y,z)
  146. return CFrame.Angles(math.rad(x)*s,math.rad(y)*s,math.rad(z)*s)
  147. end
  148.  
  149. hold = false
  150. function lightning(mouse)
  151. attacking = true
  152. r = 4
  153. if mouse.Target ~= nil then
  154. c = Instance.new("Part",m)
  155. c.formFactor = "Custom"
  156. c.Size = Vector3.new(3,0.5,3)
  157. c.Anchored = true
  158. c.TopSurface,c.BottomSurface = 0,0
  159. c.CanCollide = false
  160. c.BrickColor = BrickColor.new("New Yeller")
  161.  
  162. Instance.new("CylinderMesh",c)
  163. hold = true
  164. while hold == true do
  165. wait()
  166. c.CFrame = CFrame.new(mouse.hit.p)
  167. end
  168.  
  169. for i = 1,90,s do
  170. wait()
  171. rw.C0 = rw.C0 * ang(0,0,1)
  172. end
  173.  
  174. r = 5
  175. for i = 1,360,60 do
  176. wait()
  177. c2 = Instance.new("Part",c)
  178. c2.Size = Vector3.new(1,5,1)
  179. c2.CanCollide = false
  180. c2.Touched:connect(damage)
  181. c2.TopSurface,c2.BottomSurface = 0,0
  182. c2.Transparency = 1
  183. c2.Color = Color3.new(1,1,1)
  184. c2.CFrame = c.CFrame + Vector3.new(math.cos(math.rad(i))*r,0,math.sin(math.rad(i))*r)
  185. c2.CFrame = CFrame.new(c2.Position,c.Position)
  186. c2.Anchored = true
  187.  
  188. Instance.new("FileMesh",c2).MeshId = "rbxasset://fonts/sword.mesh"
  189.  
  190. for i = 1,0.5,-0.1 do
  191. wait()
  192. c2.Transparency = i
  193. end
  194.  
  195. end
  196.  
  197. for i = 1,50 do
  198. wait()
  199. local p = Instance.new("Part",m)
  200. p.Size = Vector3.new(1,50,1)
  201. p.Anchored = true
  202. p.CFrame = c.CFrame + Vector3.new(math.random(-r,r),p.Size.y/2-1,math.random(-r,r))
  203. p.CanCollide = false
  204. p.BrickColor = BrickColor.new("New Yeller")
  205. Instance.new("CylinderMesh",p)
  206.  
  207. for i,v in pairs(Workspace:GetChildren()) do
  208. if v:IsA("Model") and v ~= char then
  209. for i,o in pairs(v:GetChildren()) do
  210. if o:IsA("Humanoid") then
  211. if (o.Torso.Position-(p.CFrame * CFrame.new(0,-p.Size.y/2,0)).p).magnitude <= 10 then
  212. o.Health = o.Health - 1.25
  213.  
  214. end
  215. end
  216. end
  217. end
  218. end
  219.  
  220. delay(0,function()
  221. for i = 0,1,0.1 do
  222. wait()
  223. p.Transparency = i
  224. end
  225. p:Remove()
  226. end)
  227. end
  228.  
  229. for i = 1,90,s do
  230. wait()
  231. rw.C0 = rw.C0 * ang(0,0,-1)
  232. end
  233.  
  234. c:Remove()
  235. end
  236. attacking = false
  237. end
  238.  
  239.  
  240. function wave()
  241. attacking = true
  242. s = 10
  243.  
  244. for i = 1,140,s do
  245. wait()
  246. rw.C0 = rw.C0 * ang(0,0,-1)
  247. end
  248. s = 20
  249. for i = 1,220,s do
  250. wait()
  251. rw.C0 = rw.C0 * ang(0,0,1)
  252. end
  253.  
  254. bp = Instance.new("BodyPosition",torso)
  255. bp.maxForce = Vector3.new() * math.huge
  256. bp.position = torso.Position + Vector3.new(0,50,0)
  257.  
  258. while (torso.Position-bp.position).magnitude > 1 do wait() end
  259.  
  260. bp.position = bp.position - Vector3.new(0,50,0)
  261.  
  262. while (torso.Position-bp.position).magnitude > 10 do wait() end
  263. bp:Remove()
  264.  
  265. for i = 1,(220-140)+80,s do
  266. wait()
  267. rw.C0 = rw.C0 * ang(0,0,-1)
  268. end
  269.  
  270. r = 4
  271. coroutine.resume(coroutine.create(function()
  272.  
  273. for o = 2,16,2 do
  274. for i = 1,360,10 do
  275. local c = p1:Clone()
  276. c.Parent = m
  277. c.Size = Vector3.new(1,o,1)
  278. c.Anchored = true
  279. c.CFrame = CFrame.new((p2.CFrame * CFrame.new(0,p2.Size.y/2,0)).p) + Vector3.new(math.cos(math.rad(i))*r,-c.Size.y,math.sin(math.rad(i))*r)
  280.  
  281. coroutine.resume(coroutine.create(function()
  282. for i = 1,c.Size.y do
  283. wait()
  284. c.CFrame = c.CFrame + Vector3.new(0,1,0)
  285. end
  286. for i = 1,c.Size.y do
  287. wait()
  288. c.CFrame = c.CFrame - Vector3.new(0,1,0)
  289. end
  290. c:Remove()
  291. end))
  292.  
  293. end
  294. r = r+3
  295. end
  296.  
  297. end))
  298.  
  299. for i = 1,80,s do
  300. wait()
  301. rw.C0 = rw.C0 * ang(0,0,1)
  302. end
  303.  
  304. attacking = false
  305. end
  306.  
  307. function Guard()
  308. r = 20
  309.  
  310. h = 30
  311.  
  312. for o = h,100,10 do
  313. for i = 0,360,30 do
  314. local c = p1:Clone()
  315. c.Parent = Workspace
  316. c.Size = Vector3.new(8,o,8)
  317. c.Anchored = true
  318. c.Material = "Slate"
  319. c.CanCollide = true
  320. c.BrickColor = BrickColor.new("Brown")
  321. c.CFrame = torso.CFrame + Vector3.new(math.cos(math.rad(i))*r,0,math.sin(math.rad(i))*r) - Vector3.new(0,c.Size.y,0)
  322.  
  323. coroutine.resume(coroutine.create(function()
  324. for i = 1,c.Size.y,2 do
  325. wait()
  326. c.CFrame = c.CFrame + Vector3.new(0,2,0)
  327. end
  328.  
  329. delay(3,function()
  330. for i = 1,c.Size.y do
  331. wait()
  332. c.CFrame = c.CFrame - Vector3.new(0,1,0)
  333. end
  334. c:Remove()
  335. end)
  336.  
  337.  
  338. end))
  339.  
  340. end
  341. r = r+10
  342. end
  343. end
  344.  
  345. function Raise()
  346. local c = hdl:Clone()
  347. c.Parent = m
  348. c.CanCollide = true
  349. c.Material = "Slate"
  350. c.BrickColor = BrickColor.new("Brown")
  351. c.Size = Vector3.new(10,50,10)
  352. c.Anchored = true
  353. c.CFrame = torso.CFrame - Vector3.new(0,c.Size.y/2,0)
  354.  
  355. for i = 1,c.Size.y-3 do
  356. wait()
  357. c.CFrame = c.CFrame + Vector3.new(0,1,0)
  358. end
  359. end
  360.  
  361. function slash(a)
  362. attacking = true
  363. for i = 1,70,s do
  364. wait()
  365. rw.C0 = rw.C0 * ang(0,1,0)
  366. end
  367. for i = 1,90,s do
  368. wait()
  369. rw.C0 = rw.C0 * ang(0,0,-1)
  370. end
  371. for i = 1,90,s do
  372. wait()
  373. rw.C0 = rw.C0 * ang(0,0,1)
  374. end
  375. for i = 1,70,s do
  376. wait()
  377. rw.C0 = rw.C0 * ang(0,-1,0)
  378. end
  379. attacking = false
  380. end
  381.  
  382. function wield(a)
  383. s = 17
  384. if a == 1 then
  385. for i = 1,85,s do
  386. wait()
  387. rw.C0 = rw.C0 * ang(-0.1,0,1)
  388. end
  389. elseif a == 0 then
  390. for i = 1,85,s do
  391. wait()
  392. rw.C0 = rw.C0 * ang(0.1,0,-1)
  393. end
  394. end
  395. s = 20
  396. end
  397.  
  398. function kd(key,mouse)
  399. if attacking == false then
  400.  
  401. if key == "f" then lightning(mouse)
  402. elseif key == "g" then wave()
  403. elseif key == "r" then Guard()
  404. elseif key == "t" then Raise()
  405. end
  406.  
  407. end
  408. end
  409.  
  410. klist = {"f"}
  411.  
  412. function select(mouse)
  413. lock(1)
  414. wield(1)
  415.  
  416. mouse.KeyUp:connect(function(hit) for i,v in pairs(klist) do if hit == v then hold = false end end end)
  417. mouse.KeyDown:connect(function(key) kd(key,mouse) end)
  418. mouse.Button1Down:connect(function() if attacking == false then slash() end end)
  419. end
  420.  
  421. h.Selected:connect(select)
  422.  
  423. h.Deselected:connect(function() wield(0) lock(0) end)
  424.  
  425. for i,v in pairs(char:GetChildren()) do
  426. if v:IsA("BasePart") then Instance.new("ForceField",v)
  427. end end
  428.  
  429. Instance.new("ForceField",m)
  430.  
  431. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement