Ima3ine

Untitled

Jan 22nd, 2023
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.44 KB | None | 0 0
  1. --[[
  2. Script shared by eletronix ]]
  3.  
  4. me = game.Players.LocalPlayer
  5. char = me.Character
  6. bin = script.Parent
  7. selected = false
  8. attacking = false
  9. hurt = false
  10. deb = true
  11. normdmg = 18
  12. dmg = normdmg
  13. fly = false
  14. firecols = {"Bright violet", "Black", "Really black"}
  15.  
  16. parts = {}
  17.  
  18. if char:findFirstChild("Scythe",true) ~= nil then
  19. char:findFirstChild("Scythe",true).Parent = nil
  20. end
  21.  
  22. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  23. part.Parent = parent
  24. part.formFactor = form
  25. part.CanCollide = collide
  26. part.Transparency = tran
  27. part.Reflectance = ref
  28. part.Size = Vector3.new(x,y,z)
  29. part.BrickColor = BrickColor.new(color)
  30. part.TopSurface = 0
  31. part.BottomSurface = 0
  32. part.Anchored = anchor
  33. part.Locked = true
  34. part:BreakJoints()
  35. end
  36.  
  37. function weld(w, p, p1, a, b, c, x, y, z)
  38. w.Parent = p
  39. w.Part0 = p
  40. w.Part1 = p1
  41. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  42. end
  43.  
  44. function mesh(mesh, parent, x, y, z, type)
  45. mesh.Parent = parent
  46. mesh.Scale = Vector3.new(x, y, z)
  47. mesh.MeshType = type
  48. end
  49.  
  50. function getcharparts(path)
  51. local objs = {}
  52. for _,v in pairs(path:children()) do
  53. if v:IsA("Model") and v.Name ~= name then
  54. for _,k in pairs(v:children()) do
  55. if k.Name == "Torso" then
  56. table.insert(objs,k)
  57. end
  58. end
  59. end
  60. end
  61. return objs
  62. end
  63.  
  64. sword = Instance.new("Model",me.Character)
  65. sword.Name = "Scythe"
  66.  
  67. --Parts-------------------------Parts-------------------------Parts-------------------------Parts----------------------
  68.  
  69. rarm = char:findFirstChild("Right Arm")
  70. larm = char:findFirstChild("Left Arm")
  71. torso = char:findFirstChild("Torso")
  72. hum = char:findFirstChild("Humanoid")
  73.  
  74. main = Instance.new("Part")
  75. prop(main, sword, false, 0, 0, 0.45, 6.4, 0.45, "Really black", false, "Custom")
  76. mme = Instance.new("SpecialMesh")
  77. mesh(mme,main,1,1,1,"Head")
  78. table.insert(parts,main)
  79.  
  80. part1 = Instance.new("Part")
  81. prop(part1, sword, false, 0, 0, 0.45, 1, 0.45, "Really black", false, "Custom")
  82. p1m = Instance.new("SpecialMesh")
  83. mesh(p1m,part1,1,1,1,"Head")
  84. w1 = Instance.new("Weld")
  85. weld(w1, main, part1, 0, 0, -1.1, -0.3, 3.3, 0)
  86.  
  87. part2 = Instance.new("Part")
  88. prop(part2, sword, false, 0, 0, 0.45, 1, 0.45, "Really black", false, "Custom")
  89. p2m = Instance.new("SpecialMesh")
  90. mesh(p2m,part2,1,1,1,"Head")
  91. w2 = Instance.new("Weld")
  92. weld(w2, main, part2, 0, 0, -1.1, 0.3, -3.3, 0)
  93.  
  94. blade1 = Instance.new("Part")
  95. prop(blade1, sword, false, 0, 0, 1.4, 0.8, 0.1, "Dark grey", false, "Custom")
  96. b1m = Instance.new("BlockMesh",blade1)
  97. w3 = Instance.new("Weld")
  98. weld(w3, main, blade1, 0, 0, -0.4, -0.45, -3.4, 0)
  99. table.insert(parts,blade1)
  100.  
  101. blade2 = Instance.new("Part")
  102. prop(blade2, sword, false, 0, 0, 1.1, 0.8, 0.1, "Dark grey", false, "Custom")
  103. b2m = Instance.new("BlockMesh",blade2)
  104. w4 = Instance.new("Weld")
  105. weld(w4, main, blade2, 0, 0, 0, -1.5, -3.66, 0)
  106. table.insert(parts,blade2)
  107.  
  108. blade3 = Instance.new("Part")
  109. prop(blade3, sword, false, 0, 0, 0.1, 0.8, 1.7, "Dark grey", false, "Custom")
  110. b3m = Instance.new("SpecialMesh")
  111. mesh(b3m,blade3,1,1,1,"Wedge")
  112. w5 = Instance.new("Weld")
  113. weld(w5, main, blade3, 0, math.pi/2, 0.4, -2.64, -3.38, 0)
  114. table.insert(parts,blade3)
  115.  
  116. blade1b = Instance.new("Part")
  117. prop(blade1b, sword, false, 0, 0, 1.4, 0.8, 0.1, "Dark grey", false, "Custom")
  118. b1mb = Instance.new("BlockMesh",blade1b)
  119. w6 = Instance.new("Weld")
  120. weld(w6, main, blade1b, 0, 0, -0.4+math.pi, 0.45, 3.4, 0)
  121. table.insert(parts,blade1b)
  122.  
  123. blade2b = Instance.new("Part")
  124. prop(blade2b, sword, false, 0, 0, 1.1, 0.8, 0.1, "Dark grey", false, "Custom")
  125. b2mb = Instance.new("BlockMesh",blade2b)
  126. w7 = Instance.new("Weld")
  127. weld(w7, main, blade2b, 0, 0, math.pi, 1.5, 3.66, 0)
  128. table.insert(parts,blade2b)
  129.  
  130. blade3b = Instance.new("Part")
  131. prop(blade3b, sword, false, 0, 0, 0.1, 0.8, 1.7, "Dark grey", false, "Custom")
  132. b3mb = Instance.new("SpecialMesh")
  133. mesh(b3mb,blade3b,1,1,1,"Wedge")
  134. w8 = Instance.new("Weld")
  135. weld(w8, main, blade3b, 0, math.pi/2, 0.4+math.pi, 2.64, 3.38, 0)
  136. table.insert(parts,blade3b)
  137.  
  138. for i=0.9, 1.6, 0.09 do
  139. hp1 = Instance.new("Part")
  140. prop(hp1, sword, false, 0, 0, 0.48, 0.09, 0.48, "White", false, "Custom")
  141. h1m = Instance.new("SpecialMesh")
  142. mesh(h1m,hp1,1,1,1,"Head")
  143. w9 = Instance.new("Weld")
  144. weld(w9, main, hp1, math.random(-20,20)/100, 0, math.random(-20,20)/100, 0, i, 0)
  145. end
  146.  
  147. for i=0.9, 1.6, 0.09 do
  148. hp2 = Instance.new("Part")
  149. prop(hp2, sword, false, 0, 0, 0.48, 0.09, 0.48, "White", false, "Custom")
  150. h2m = Instance.new("SpecialMesh")
  151. mesh(h2m,hp2,1,1,1,"Head")
  152. w10 = Instance.new("Weld")
  153. weld(w10, main, hp2, math.random(-20,20)/100, 0, math.random(-20,20)/100, 0, -i, 0)
  154. end
  155.  
  156. --Arm joints-----------------------Arm joints-----------------------Arm joints---------------------
  157.  
  158. righthold = Instance.new("Part")
  159. prop(righthold, sword, false, 1, 0, 0.1, 0.1, 0.1, "White", false, "Custom")
  160. w11 = Instance.new("Weld")
  161. weld(w11, rarm, righthold, 0, 0, 0, 0, 1, 0)
  162.  
  163. lefthold = Instance.new("Part")
  164. prop(lefthold, sword, false, 1, 0, 0.1, 0.1, 0.1, "White", false, "Custom")
  165. w12 = Instance.new("Weld")
  166. weld(w12, larm, lefthold, 0, 0, 0, 0, 1, 0)
  167.  
  168. rb = Instance.new("Part")
  169. prop(rb, sword, false, 1, 0, 0.1, 0.1, 0.1, "White", false, "Custom")
  170. w13 = Instance.new("Weld")
  171. weld(w13, torso, rb, 0, 0, 0, -1.5, -0.5, 0)
  172.  
  173. lb = Instance.new("Part")
  174. prop(lb, sword, false, 1, 0, 0.1, 0.1, 0.1, "White", false, "Custom")
  175. w14 = Instance.new("Weld")
  176. weld(w14, torso, lb, 0, 0, 0, 1.5, -0.5, 0)
  177.  
  178. rw = Instance.new("Weld")
  179. weld(rw, rb, nil, 0, 0, 0, 0, 0.5, 0)
  180.  
  181. lw = Instance.new("Weld")
  182. weld(lw, lb, nil, 0, 0, 0, 0, 0.5, 0)
  183.  
  184.  
  185. holdweld = Instance.new("Weld")
  186. weld(holdweld,torso,main,0,0,0.85,0,0,-0.64)
  187.  
  188. rh = Instance.new("Weld")
  189. weld(rh,righthold,nil,math.pi/2,0,math.pi,0,0,1)
  190.  
  191. lh = Instance.new("Weld")
  192. weld(lh,lefthold,nil,math.pi/2,0,0,0,0,0)
  193.  
  194. rightbattle = nil
  195. leftbattle = nil
  196.  
  197. if script.Parent.className ~= "HopperBin" then
  198. h = Instance.new("HopperBin",me.Backpack)
  199. h.Name = "Scythe"
  200. script.Parent = h
  201. end
  202.  
  203. bin = script.Parent
  204.  
  205. function selectmotion()
  206. rw.Part1 = rarm
  207. rh.C0 = CFrame.new(0,0,0)
  208. rw.C0 = CFrame.new(0,0,0)
  209. lw.C0 = CFrame.new(0,0,0)
  210. for i=1, 7 do
  211. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(-0.25,0.13,-0.1)
  212. wait()
  213. end
  214. rh.Part1 = main
  215. holdweld.Part1 = nil
  216. for i=1, 5 do
  217. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(-0.3,0,-0.1)
  218. rh.C0 = rh.C0 * CFrame.new(0,0,0.4) * CFrame.fromEulerAnglesXYZ(0,0,-(math.pi/2)/5)
  219. wait()
  220. end
  221. lw.Part1 = larm
  222. for i=1, 5 do
  223. rw.C0 = rw.C0 * CFrame.new(-0.03,0.05,0.08) * CFrame.fromEulerAnglesXYZ(-0.3,-0.2,0.13)
  224. lw.C0 = lw.C0 * CFrame.new(0.08,0,0) * CFrame.fromEulerAnglesXYZ(0.2,0,0)
  225. wait()
  226. end
  227. rightbattle = rw.C0
  228. leftbattle = lw.C0
  229. rh.Part1 = main
  230. lw.Part1 = larm
  231. rw.C0 = rightbattle
  232. lw.C0 = leftbattle
  233. selected = true
  234. end
  235.  
  236. function deselmotion()
  237. selected = false
  238. rightbattle = rw.C0
  239. leftbattle = lw.C0
  240. rh.Part1 = main
  241. lw.Part1 = larm
  242. rw.Part1 = rarm
  243. rw.C0 = rightbattle
  244. lw.C0 = leftbattle
  245. for i=1, 5 do
  246. rw.C0 = rw.C0 * CFrame.new(0.03,-0.05,-0.08) * CFrame.fromEulerAnglesXYZ(0.3,0.2,-0.13)
  247. lw.C0 = lw.C0 * CFrame.new(-0.08,0,0) * CFrame.fromEulerAnglesXYZ(-0.2,0,0)
  248. wait()
  249. end
  250. lw.Part1 = nil
  251. for i=1, 5 do
  252. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0.3,0,0.1)
  253. rh.C0 = rh.C0 * CFrame.new(0,0,-0.4) * CFrame.fromEulerAnglesXYZ(0,0,(math.pi/2)/5)
  254. wait()
  255. end
  256. holdweld.Part1 = main
  257. rh.Part1 = nil
  258. for i=1, 7 do
  259. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0.25,-0.13,0.1)
  260. wait()
  261. end
  262. rw.Part1 = nil
  263. lw.Part1 = nil
  264. rh.C0 = CFrame.new(0,0,0)
  265. rw.C0 = CFrame.new(0,0,0)
  266. lw.C0 = CFrame.new(0,0,0)
  267. end
  268.  
  269. --Effect------------------Effect------------------Effect------------------Effect------------------Effect----------------
  270.  
  271. function effect()
  272. for _,v in pairs(parts) do
  273. local o = v:clone()
  274. o.Parent = workspace
  275. o.Transparency = 0.6
  276. o.BrickColor = BrickColor.new("Bright violet")
  277. o.Anchored = true
  278. o.CanCollide = false
  279. o.CFrame = v.CFrame
  280. coroutine.resume(coroutine.create(function()
  281. for i=o.Transparency, 1, 0.07 do
  282. wait()
  283. o.Transparency = i
  284. end
  285. o:remove()
  286. end))
  287. end
  288. end
  289.  
  290. --KILL FUNCTION-------------KILL FUNCTION-------------KILL FUNCTION-------------KILL FUNCTION-----------
  291.  
  292.  
  293. function kill(h)
  294. if hurt and deb then
  295. local hu = h.Parent:findFirstChild("Humanoid")
  296. if hu ~= nil and h.Parent.Name ~= name then
  297. deb = false
  298. local dam = math.random(0,dmg)
  299. hu.Health = hu.Health - dam
  300. local p = Instance.new("Part")
  301. prop(p,nil,false,1,0,0.9,0.25,0.9,"Bright red",false,"Custom")
  302. p.CFrame = CFrame.new(blade3b.Position) * CFrame.new(0,2,0)
  303. local bil = Instance.new("BillboardGui",p)
  304. bil.Adornee = bil.Parent
  305. bil.Size = UDim2.new(0,60,0,60)
  306. local txt = Instance.new("TextLabel",bil)
  307. txt.Text = dam
  308. txt.BackgroundTransparency = 1
  309. txt.FontSize = "Size24"
  310. txt.Size = UDim2.new(0,60,0,60)
  311. local bp = Instance.new("BodyPosition",p)
  312. bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  313. bp.P = 200000
  314. bp.position = p.Position
  315. local po = bp.position
  316. local cf = CFrame.Angles(0,0,0)
  317. if fly then
  318. local too = h.Parent:findFirstChild("Torso")
  319. if too ~= nil then
  320. coroutine.resume(coroutine.create(function()
  321. hu.PlatformStand = true
  322. wait(0.06)
  323. local c = CFrame.new(torso.Position, too.Position)
  324. too.Velocity = c.lookVector * math.random(30,70)
  325. wait(0.6)
  326. hu.PlatformStand = false
  327. end))
  328. end
  329. end
  330. coroutine.resume(coroutine.create(function()
  331. p.Parent = workspace
  332. for i=0, math.random(16,27), 0.35 do
  333. wait()
  334. cf = CFrame.Angles(0,i/1.3,0) * CFrame.new(0,i/1.7,i/3.2)
  335. bp.position = po + cf.p
  336. end
  337. p:remove()
  338. end))
  339. coroutine.resume(coroutine.create(function()
  340. wait(0.14)
  341. deb = true
  342. end))
  343. end
  344. end
  345. end
  346.  
  347. for _,v in pairs(parts) do
  348. v.Touched:connect(kill)
  349. end
  350.  
  351. --Attacks-----------Attacks----------------Attacks-----------Attacks----------------Attacks-----------Attacks--------------
  352.  
  353. function att()
  354. attacking = true
  355. for i=1,7 do
  356. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0.05,-0.2,-0.05)
  357. lw.C0 = lw.C0 * CFrame.new(0.07,-0.08,0) * CFrame.fromEulerAnglesXYZ(0,0,0.12)
  358. wait()
  359. end
  360. for i=1,6 do
  361. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(-0.3,0,0.05)
  362. lw.C0 = lw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0.2,0,0.1)
  363. wait()
  364. end
  365. hurt = true
  366. for i=1,6 do
  367. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0.5,-0.06,0.12)
  368. lw.C0 = lw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(-0.23,-0.07,0)
  369. effect()
  370. wait()
  371. end
  372. hurt = false
  373. for i=1,6 do
  374. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(-0.13,0.23,-0.2)
  375. lw.C0 = lw.C0 * CFrame.new(-0.08,0.09,0.03) * CFrame.fromEulerAnglesXYZ(-0.1,0.15,-0.15)
  376. effect()
  377. wait()
  378. end
  379. rw.C0 = rightbattle
  380. lw.C0 = leftbattle
  381. attacking = false
  382. end
  383.  
  384. function throw()
  385. attacking = true
  386. for i=1,7 do
  387. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(-0.08,-0.14,-0.2)
  388. wait()
  389. end
  390. for i=1,3 do
  391. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(-0.2,-0,0)
  392. effect()
  393. wait()
  394. end
  395. for i=1,4 do
  396. rw.C0 = rw.C0 * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0.45,-0,0)
  397. effect()
  398. wait()
  399. end
  400. rh.Part1 = nil
  401. local bv = Instance.new("BodyVelocity",main)
  402. bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  403. bv.velocity = torso.CFrame.lookVector * 70
  404. local bav = Instance.new("BodyAngularVelocity",main)
  405. bav.P = 10000
  406. bav.angularvelocity = torso.CFrame.lookVector * 40
  407. local lolpos = torso.CFrame
  408. wait(0.4)
  409. hurt = true
  410. dmg = 65
  411. coroutine.resume(coroutine.create(function()
  412. repeat wait() effect() until (main.Position - torso.Position).magnitude < 11
  413. rh.Part1 = main
  414. bv:remove()
  415. bav:remove()
  416. rw.C0 = rightbattle
  417. lw.C0 = leftbattle
  418. attacking = false
  419. hurt = false
  420. dmg = normdmg
  421. end))
  422. wait(3)
  423. bv.velocity = lolpos.lookVector * -180
  424. end
  425.  
  426. function spin()
  427. attacking = true
  428. wait(0.1)
  429. local bg = Instance.new("BodyGyro",torso)
  430. bg.P = 13000
  431. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  432. local cf = CFrame.Angles(0,0,0)
  433. local xd = torso.CFrame
  434. bg.cframe = CFrame.new(torso.Position, xd * cf * CFrame.new(0,0,-90).p)
  435. for i=1,4 do
  436. rw.C0 = rw.C0 * CFrame.new(0,0.1,0) * CFrame.fromEulerAnglesXYZ(0.35,0,-0.07)
  437. lw.C0 = lw.C0 * CFrame.new(0,0.1,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  438. wait()
  439. end
  440. hurt = true
  441. fly = true
  442. for i=0,math.pi*4,math.pi/6 do
  443. wait()
  444. cf = CFrame.Angles(0,-i,0)
  445. bg.cframe = CFrame.new(torso.Position, xd * cf * CFrame.new(0,0,-90).p)
  446. effect()
  447. end
  448. hurt = false
  449. fly = false
  450. bg:remove()
  451. for i=1,4 do
  452. rw.C0 = rw.C0 * CFrame.new(0,-0.1,0) * CFrame.fromEulerAnglesXYZ(-0.35,0,0.07)
  453. lw.C0 = lw.C0 * CFrame.new(0,-0.1,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  454. wait()
  455. end
  456. rw.C0 = rightbattle
  457. lw.C0 = leftbattle
  458. wait(0.2)
  459. attacking = false
  460. end
  461.  
  462. function select(mouse)
  463. repeat wait() until selected == false and attacking == false
  464. if selected == false then
  465. selectmotion()
  466. end
  467. coroutine.resume(coroutine.create(function()
  468. while selected do
  469. wait(0.25)
  470. if torso.RotVelocity.Y < -14 and attacking == false then
  471. spin()
  472. end
  473. end
  474. end))
  475. mouse.Button1Down:connect(function()
  476. if selected and attacking == false then
  477. att()
  478. end
  479. end)
  480. mouse.KeyDown:connect(function(kai)
  481. if attacking == false then
  482. omg = kai:lower()
  483. if omg == "r" then
  484. throw()
  485. end
  486. end
  487. end)
  488. end
  489.  
  490. function desel()
  491. repeat wait() until selected and attacking == false
  492. if selected then
  493. deselmotion()
  494. end
  495. end
  496.  
  497. bin.Selected:connect(select)
  498. bin.Deselected:connect(desel)
  499.  
  500. --mediafir
Add Comment
Please, Sign In to add comment