Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.64 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83. ---------------------------Made by Ben831------------------------------
  84. Players = game:GetService("Players")
  85.  
  86. me = Players.benli45
  87. char = me.Character
  88.  
  89. Toolname = "Tanto"
  90. Modelname = "STOP"
  91.  
  92. selected = false
  93. effect = false
  94. hurt = false
  95. debounce = true
  96. able = true
  97. charge = false
  98. soundable = true
  99. cancharge = true
  100. cam = game.Workspace.CurrentCamera
  101.  
  102. surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  103.  
  104. New = {
  105. Gyro = function(P)
  106. local bg = Instance.new("BodyGyro", P)
  107. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  108. bg.P = 14000
  109. return bg
  110. end,
  111. Position = function(P)
  112. local bp = Instance.new("BodyPosition", P)
  113. bp.maxForce = Vector3.new(math.huge, 0, math.huge)
  114. bp.P = 14000
  115. return bp
  116. end,
  117. Force = function(P)
  118. local bf = Instance.new("BodyForce", P)
  119. bf.force = Vector3.new(0, P:GetMass()*187, 0)
  120. return bf
  121. end,
  122. Sound = function(P, ID, vol, pitch)
  123. local s = Instance.new("Sound")
  124. s.SoundId = ID
  125. s.Volume = vol
  126. s.Pitch = pitch
  127. s.Parent = P
  128. return s
  129. end
  130. }
  131.  
  132. torso = char.Torso
  133. neck = torso.Neck
  134. human = char.Humanoid
  135. Rarm = char["Right Arm"]
  136. Larm = char["Left Arm"]
  137. Rleg = char["Right Leg"]
  138. Lleg = char["Left Leg"]
  139.  
  140. Sounds = {
  141. slash = "rbxasset://sounds//swordslash.wav",
  142. unsheath = "rbxasset://sounds//unsheath.wav",
  143. hitsound = "http://www.roblox.com/asset/?id=2801263", --0.5
  144. charge = "http://www.roblox.com/asset/?id=2101137", --0.5
  145. boom = "http://www.roblox.com/asset/?id=2691586", --0.3
  146. bewm = "http://www.roblox.com/asset/?id=2760979", --0.3
  147. splat = "http://roblox.com/asset/?id=10209590"
  148. }
  149.  
  150. function EnableSound(time)
  151. coroutine.resume(coroutine.create(function()
  152. wait(time)
  153. soundable = true
  154. end))
  155. end
  156.  
  157. function PlaySound(soundname, pitch)
  158. if soundable then
  159. soundable = false
  160. local s = New.Sound(torso, Sounds[soundname], 0.5, pitch)
  161. s.PlayOnRemove = true
  162. if pitch < 0 then
  163. coroutine.resume(coroutine.create(function()
  164. s.Looped = true
  165. s.PlayOnRemove = false
  166. wait()
  167. s:Play()
  168. wait(.2)
  169. s.Looped = false
  170. wait()
  171. s:remove()
  172. end))
  173. else
  174. coroutine.resume(coroutine.create(function()
  175. wait()
  176. s:remove()
  177. s.Looped=false
  178. end))
  179. end
  180. EnableSound(0.12)
  181. return s
  182. end
  183. end
  184.  
  185. function Weld(p0, p1, x, y, z, a, b, c)
  186. local w = Instance.new("Weld")
  187. w.Parent = p0
  188. w.Part0 = p0
  189. w.Part1 = p1
  190. w.C1 = CFrame.new(x, y, z) * CFrame.Angles(a, b, c)
  191. return w
  192. end
  193.  
  194. function Part(parent, anchor, collide, tran, ref, color, x, y, z, Break, lifetime)
  195. local p = Instance.new("Part")
  196. p.formFactor = "Custom"
  197. p.Anchored = anchor
  198. p.CanCollide = collide
  199. p.Transparency = tran
  200. p.Reflectance = ref
  201. p.BrickColor = BrickColor.new(color)
  202. for _, Surf in pairs(surfaces) do
  203. p[Surf] = "Smooth"
  204. end
  205. p.Size = Vector3.new(x, y, z)
  206. if Break then
  207. p:BreakJoints()
  208. else
  209. p:MakeJoints()
  210. end
  211. p.Parent = parent
  212. p.Locked = true
  213. if lifetime then
  214. game:GetService("Debris"):AddItem(p, lifetime)
  215. end
  216. return p
  217. end
  218.  
  219. function getHum(c)
  220. local h = nil
  221. for i,v in pairs(c:GetChildren()) do
  222. if v:IsA("Humanoid") and c ~= char then
  223. if v.Health > 0 then
  224. h = v
  225. end
  226. end
  227. end
  228. return h
  229. end
  230.  
  231. for i, v in pairs(char:children()) do
  232. if v.Name == Modelname then
  233. v:remove()
  234. end
  235. end
  236.  
  237. for i, v in pairs(me.Backpack:GetChildren()) do
  238. if v.Name == Toolname then
  239. v:remove()
  240. end
  241. end
  242.  
  243. Mo = Instance.new("Model")
  244. Mo.Name = Modelname
  245.  
  246. RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  247. LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  248. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  249. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  250. gripBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  251. Weld(Rarm, gripBrick, 0, 1, 0, 0, 0, 0)
  252.  
  253. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  254. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  255. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  256. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  257.  
  258. TH = Weld(Rleg, nil, -0.6, 0, 0, math.pi/6, 0, 0)
  259.  
  260. RABW2 = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
  261. LABW2 = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0)
  262. RLBW2 = Weld(RLBrick, nil, 0, 0.77, 0, 0, 0, 0)
  263. LLBW2 = Weld(LLBrick, nil, 0, 0.77, 0, 0, 0, 0)
  264.  
  265. handle = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.8, 0.3, true)
  266. handle.Name = "Handle"
  267. Instance.new("BlockMesh", handle).Scale = Vector3.new(0.8, 1, 0.8)
  268.  
  269. gaurd = Part(Mo, false, false, 0, 0, "Really black", 0.35, 0.2, 0.45, true)
  270. gaurd.Name = "Gaurd"
  271. Instance.new("BlockMesh", gaurd).Scale = Vector3.new(0.8, 0.5, 0.8)
  272.  
  273. blade = Part(Mo, false, false, 0, 0.1, "Lime green", 0.2, 1.15, 0.3, true)
  274. blade.Name = "Blade"
  275. Instance.new("BlockMesh", blade).Scale = Vector3.new(0.1, 1, 0.8)
  276.  
  277. bladetip = Part(Mo, false, false, 0, 0.1, "Lime green", 0.2, 0.3, 0.3, true)
  278. bladetip.Name = "Tip"
  279. bladetipmesh = Instance.new("SpecialMesh", bladetip)
  280. bladetipmesh.MeshType = "Wedge"
  281. bladetipmesh.Scale = Vector3.new(0.1, 1, 0.8)
  282.  
  283. sheath = Part(Mo, false, false, 0, 0, "Really black", 0.3, 1.5, 0.4, true)
  284. sheath.Name = "Sheath"
  285. Instance.new("BlockMesh", sheath)
  286.  
  287. sheathweld = Weld(sheath, blade, 0, 0.23, 0, math.pi, 0, 0)
  288. grip = Weld(gripBrick, nil, 0, 0, 0, -math.pi/2, 0, 0)
  289. Weld(handle, gaurd, 0, -0.4, 0, 0, 0, 0)
  290. Weld(gaurd, blade, 0, -0.575, 0, 0, 0, 0)
  291. Weld(blade, bladetip, 0, -0.725, 0, 0, 0, 0)
  292.  
  293. Mo.Parent = char
  294. TH.Part1 = sheath
  295.  
  296. if not script.Parent:IsA("HopperBin") then
  297. bin = Instance.new("HopperBin", me.Backpack)
  298. bin.Name = Toolname
  299. script.Parent = bin
  300. end
  301.  
  302. function infect(hit)
  303. for i,v in pairs(hit.Parent:GetChildren()) do
  304. if v:IsA("Humanoid") then
  305. if v:FindFirstChild("poison") == nil then
  306. Instance.new("BoolValue",v).Name = "poison"
  307.  
  308. coroutine.resume(coroutine.create(function()
  309. for i = 1,30 do
  310. wait()
  311. v.Health = v.Health - 1
  312.  
  313. local c = p1:Clone()
  314. c.Parent = m
  315. c.Size = Vector3.new(0.5,0.5,0.5)
  316. c.CFrame = v.Torso.CFrame + Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3))
  317. c.Anchored = true
  318. c.Transparency = 0.5
  319. c.Color = Color3.new(0,0.3,0)
  320.  
  321. delay(0.1,function()
  322. for i = 0.5,1,0.05 do
  323. wait()
  324. c.Transparency = i
  325. end
  326. c:Remove()
  327. end)
  328.  
  329. end
  330. v:FindFirstChild("poison"):Remove()
  331. end))
  332.  
  333. end
  334. end
  335. end
  336. end
  337.  
  338. function dmg(hum, dm1, dm2)
  339. local dmg = math.random(dm1, dm2)
  340. local ko = Instance.new("ObjectValue", hum)
  341. ko.Name = "creator"
  342. ko.Value = me
  343. hum.Health = hum.Health - dmg
  344. coroutine.resume(coroutine.create(function()
  345. wait()
  346. ko:remove()
  347. end))
  348. for i = 0, dmg/5 do
  349. local blood = Part(workspace, false, false, 0, 0, "Really red", 0.2, 0.2, 0.2, true)
  350. blood.CFrame = hum.Parent.Torso.CFrame
  351. blood.RotVelocity = Vector3.new(math.random(-10,10), math.random(-10,10), math.random(-10,10))
  352. blood.Velocity = Vector3.new(math.random(-20,20), math.random(5,20), math.random(-20,20))
  353. --Instance.new("SpecialMesh", blood).MeshType = "Sphere"
  354. coroutine.resume(coroutine.create(function()
  355. for i = 0, 3, 0.1 do
  356. --blood.SpecialMesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i)
  357. blood.Transparency = i / 3
  358. wait()
  359. end
  360. end))
  361. end
  362. return dmg
  363. end
  364.  
  365. function unsheath()
  366. PlaySound("unsheath", 2)
  367. coroutine.resume(coroutine.create(function()
  368. for i = 0, 90, 15 do
  369. RABW2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0)
  370. wait()
  371. end
  372. wait()
  373. RABW2.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(-math.rad(90), 0, 0)
  374. end))
  375. coroutine.resume(coroutine.create(function()
  376. wait()
  377. wait()
  378. for i = 0, 180, 30 do
  379. for _, v in pairs(game.Workspace:GetChildren()) do
  380. if getHum(v)~=nil then
  381. if v:findFirstChild("Torso")~=nil then
  382. if (v.Torso.Position - blade.Position).magnitude < 2 then
  383. local hum = getHum(v)
  384. dmg(hum, 4, 6)
  385. PlaySound("splat", 1.2)
  386. end
  387. end
  388. end
  389. end
  390. wait()
  391. end
  392. end))
  393. wait()
  394. wait()
  395. sheathweld.Part1 = nil
  396. grip.Part1 = handle
  397. for i = 0, -180, -30 do
  398. wait()
  399. grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6)
  400. end
  401. end
  402.  
  403. function sheath()
  404. PlaySound("unsheath", -2)
  405. coroutine.resume(coroutine.create(function()
  406. for i = 90, 0, -15 do
  407. RABW2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0)
  408. wait()
  409. end
  410. end))
  411. coroutine.resume(coroutine.create(function()
  412. for i = -180, 0, 30 do
  413. grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6)
  414. wait()
  415. end
  416. end))
  417. coroutine.resume(coroutine.create(function()
  418. wait()
  419. wait()
  420. for i = 0, 180, 30 do
  421. for _, v in pairs(game.Workspace:GetChildren()) do
  422. if getHum(v)~=nil then
  423. if v:findFirstChild("Torso")~=nil then
  424. if (v.Torso.Position - blade.Position).magnitude < 2 then
  425. local hum = getHum(v)
  426. dmg(hum, 3, 5)
  427. PlaySound("splat", 1.2)
  428. end
  429. end
  430. end
  431. end
  432. wait()
  433. end
  434. end))
  435. for i = 90, 30, -15 do
  436. wait()
  437. end
  438. grip.Part1 = nil
  439. sheathweld.Part1 = blade
  440. end
  441.  
  442. function freeze(m)
  443. local trg = m.Target
  444. if (trg==nil) then return end
  445. local phit = game.Players:findFirstChild(trg.Parent.benli45)
  446. if (phit~=nil) then
  447. if (phit==p) then return end
  448. local char = trg.Parent
  449. if (char:findFirstChild("Torso")==nil) then return end
  450. if (char:findFirstChild("fr_block")==nil) then
  451. local pa = Instance.new("Part")
  452. local bl = Instance.new("BlockMesh")
  453. bl.Parent = pa
  454. pa.Anchored = true
  455. pa.Name = "fr_block"
  456. pa.Transparency = 1
  457. pa.BrickColor = BrickColor.New("Lime green")
  458. pa.FormFactor = "Custom"
  459. pa.Size = Vector3.new(6,7,6)
  460. pa.CFrame = char["Torso"].CFrame
  461. pa.Parent = char
  462. char.Humanoid.WalkSpeed = 0
  463. if (char.Humanoid.Health<char.Humanoid.MaxHealth/4) then
  464. char.Humanoid.Health = 0
  465. else
  466. char.Humanoid.Health = char.Humanoid.Health - char.Humanoid.MaxHealth/4
  467. end
  468. local g = char:GetChildren()
  469. for i = 1,#g do
  470. if (g[i]:IsA("Part")) then
  471. g[i].Anchored = true
  472. g[i].Reflectance = .3
  473. end
  474. end
  475. for i = 1,10 do
  476. pa.Transparency = pa.Transparency - .06
  477. pa.Reflectance = pa.Reflectance + .01
  478. wait(.01)
  479. end
  480. else
  481. if (phit~=nil) then
  482. local fr = char["fr_block"]
  483. local char = trg.Parent
  484. for i = 1,10 do
  485. fr.Transparency = fr.Transparency + .06
  486. fr.Reflectance = fr.Reflectance - .01
  487. wait(.01)
  488. end
  489. local g = char:GetChildren()
  490. for i = 1,#g do
  491. if (g[i]:IsA("Part")) then
  492. g[i].Anchored = false
  493. g[i].Reflectance = 0
  494. end
  495. end
  496. char.Humanoid.WalkSpeed = 16
  497. fr:remove()
  498. end
  499. end
  500. end
  501. end
  502.  
  503. function explode(m)
  504. local t = m.Hit.p
  505. local trg = m.Target
  506. if (trg==nil) then return end
  507. local e = Instance.new("Explosion")
  508. e.BlastRadius = 20
  509. e.BlastPressure = 20
  510. e.Position = t
  511. e.Parent = game.Workspace
  512. end
  513.  
  514. function fire(m)
  515. local trg = m.Target
  516. if (trg==nil) then return end
  517. local phit = game.Players:findFirstChild(trg.Parent.benli45)
  518. if (phit~=nil) then
  519. local char = trg.Parent
  520. if (char:findFirstChild("Torso")==nil) then return end
  521. local f = Instance.new("Fire")
  522. f.Color = Color3.new(0,0,0)
  523. f.SecondaryColor = Color3.new(0,5,0)
  524. f.Parent = char.Torso
  525. f.Name = "BurnFire"
  526. coroutine.resume(coroutine.create(function()
  527. while (char.Humanoid.Health>0) do
  528. if (char.Humanoid.Health<2) then
  529. char.Humanoid.Health = 0
  530. char:BreakJoints()
  531. else
  532. char.Humanoid.Health = char.Humanoid.Health - 2
  533. end
  534. wait(.05)
  535. end
  536. end))
  537. end
  538. end
  539.  
  540. function slash()
  541. PlaySound("slash", math.random(1750,2000)/1000)
  542. coroutine.resume(coroutine.create(function()
  543. for i = 90, 0, -30 do
  544. RABW2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0)
  545. wait()
  546. end
  547. for i = 0, 90, 30 do
  548. RABW2.C1 = CFrame.new(0, 0.5, math.sin(i/29)/6) * CFrame.Angles(-math.rad(i), 0, 0)
  549. wait()
  550. end
  551. end))
  552.  
  553. for i = 0, 180, 30 do
  554. for _, v in pairs(game.Workspace:GetChildren()) do
  555. if getHum(v)~=nil then
  556. if v:findFirstChild("Torso")~=nil then
  557. if (v.Torso.Position - blade.Position).magnitude < 2 then
  558. local hum = getHum(v)
  559. dmg(hum, 3, 5)
  560. PlaySound("splat", 1)
  561. end
  562. end
  563. end
  564. end
  565. wait()
  566. end
  567. end
  568.  
  569. function stab()
  570. coroutine.resume(coroutine.create(function()
  571. for i = 0.5, -0.3, -0.1 do
  572. RABW2.C1 = CFrame.new(0, i, 0) * CFrame.Angles(-math.rad(90), 0, 0)
  573. wait()
  574. end
  575. for i = 180, 270, 30 do
  576. grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6)
  577. wait()
  578. end
  579. wait(0.1)
  580. PlaySound("slash", math.random(1700,1900)/1000)
  581. for i = -0.25, 0.5, 0.25 do
  582. RABW2.C1 = CFrame.new(0, i, 0) * CFrame.Angles(-math.rad(90), 0, 0)
  583. wait()
  584. end
  585. for i = 270, 180, -10 do
  586. grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6)
  587. wait()
  588. end
  589. end))
  590. for i = -0.3, 0.5, 0.1 do
  591. wait()
  592. end
  593. for i = 180, 270, 30 do
  594. wait()
  595. end
  596. for i = 0, 0.5, 0.25 do
  597. for _, v in pairs(game.Workspace:GetChildren()) do
  598. if getHum(v)~=nil then
  599. if v:findFirstChild("Torso")~=nil then
  600. if (v.Torso.Position - blade.Position).magnitude < 2 then
  601. local hum = getHum(v)
  602. dmg(hum, 10, 15)
  603. --PlaySound("hitsound", 1.2)
  604. PlaySound("splat", 0.6)
  605. end
  606. end
  607. end
  608. end
  609. wait()
  610. end
  611. for i = 180, 270, 30 do
  612. for _, v in pairs(game.Workspace:GetChildren()) do
  613. if getHum(v)~=nil then
  614. if v:findFirstChild("Torso")~=nil then
  615. if (v.Torso.Position - blade.Position).magnitude < 2 then
  616. local hum = getHum(v)
  617. dmg(hum, 1, 1)
  618. end
  619. end
  620. end
  621. end
  622. wait()
  623. end
  624. end
  625.  
  626. function slice()
  627. coroutine.resume(coroutine.create(function()
  628. for i = 0, 60, 15 do
  629. RABW2.C1 = CFrame.new(.3, math.sin(i/29)/6 + .1, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0)
  630. wait()
  631. end
  632. wait(.1)
  633. PlaySound("slash", math.random(1700,1900)/1000)
  634. wait(.1)
  635. for i = 60, -60, -30 do
  636. RABW2.C1 = CFrame.new(.25, math.sin(i/29)/6 + 1, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0)
  637. wait()
  638. end
  639. end))
  640. coroutine.resume(coroutine.create(function()
  641. for i = 180, 270, 30 do
  642. grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), -math.rad(i), 0) --(math.sin(i/59)/6)
  643. wait()
  644. end
  645. end))
  646. for i = 0, 150, 15 do
  647. wait()
  648. end
  649. for i = 0, 180, 30 do
  650. for _, v in pairs(game.Workspace:GetChildren()) do
  651. if getHum(v)~=nil then
  652. if v:findFirstChild("Torso")~=nil then
  653. if (v.Torso.Position - blade.Position).magnitude < 2 then
  654. local hum = getHum(v)
  655. dmg(hum, 45, 60 - (v.Torso.Position - blade.Position).magnitude * 5)
  656. PlaySound("hitsound", 1.5)
  657. end
  658. end
  659. end
  660. end
  661. wait()
  662. end
  663. wait(.3)
  664. for i = -60, 0, 30 do
  665. RABW2.C1 = CFrame.new(0, math.sin(i/29)/6 + 0.5, 0) * CFrame.Angles(-math.rad(90), math.rad(i), 0)
  666. wait()
  667. end
  668. for i = 270, 180, -30 do
  669. grip.C1 = CFrame.new(0, -0.2, 0) * CFrame.Angles(math.rad(i) - math.rad(90), 0, 0) --(math.sin(i/59)/6)
  670. wait()
  671. end
  672. end
  673.  
  674. function select(mouse)
  675. RABW2.Part1 = Rarm
  676. LABW2.Part1 = nil
  677. RLBW2.Part1 = nil
  678. LLBW2.Part1 = nil
  679. unsheath()
  680. mouse.Button1Down:connect(function()
  681. if able then
  682. able = false
  683. slash(mouse.Hit.p)
  684. able = true
  685. end
  686. end)
  687. mouse.KeyDown:connect(function(key)
  688. if able then
  689. key = key:lower()
  690. if key == "z" then
  691. able = false
  692. slash(mouse.Hit.p)
  693. able = true
  694. elseif key == "x" then
  695. able = false
  696. stab(mouse.Hit.p)
  697. able = true
  698. elseif key == "c" then
  699. able = false
  700. slice(mouse.Hit.p)
  701. able = true
  702. elseif key == "v" then
  703. freeze(mouse)
  704. elseif key == "b" then
  705. explode(mouse)
  706. elseif key == "n" then
  707. fire(mouse)
  708. end
  709. end
  710. end)
  711. end
  712.  
  713. function deselect()
  714. sheath()
  715. RABW2.Part1 = nil
  716. LABW2.Part1 = nil
  717. RLBW2.Part1 = nil
  718. LLBW2.Part1 = nil
  719. end
  720.  
  721. bin.Selected:connect(select)
  722. bin.Deselected:connect(deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement