Advertisement
yoinkydoodlewastaken

newar.

Apr 10th, 2020
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter (but technically rohan converted, iPxter made fe thing but ok)
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").Rohan_Kishiba
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. local Handle = Instance.new("Part", game.Players.Rohan_Kishiba.Character)
  88. Handle:BreakJoints()
  89. Handle.TopSurface = "Smooth"
  90. Handle.Material = "SmoothPlastic"
  91. Handle.Name = 'Handle'
  92. Handle.Transparency=1
  93. Handle.BottomSurface = "Smooth"
  94. Handle.FormFactor = "Custom" Handle.CanCollide = false
  95. Handle.BrickColor = BrickColor.new("Medium stone grey")
  96. Handle.Size = Vector3.new(0.5, 4.9000001, 0.799999833)
  97. local Handleweld = Instance.new("ManualWeld")
  98. Handleweld.Part0 = game.Players.Rohan_Kishiba.Character["Right Arm"]
  99. Handleweld.Part1 = Handle Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  100. Handleweld.C1 = CFrame.new(-0.0500130653, -0.15998745, 0.999988556, 1, 0, 0, 0, 0, -1, 0, 0.999999881, 0)
  101. Handleweld.Parent = game.Players.Rohan_Kishiba.Character["Right Arm"]
  102. staffweld=Handleweld
  103. Handlecf=Handleweld.C1
  104. local Grip = Instance.new("Part", game.Players.Rohan_Kishiba.Character)
  105. Grip:BreakJoints()
  106. Grip.TopSurface = "Smooth"
  107. Grip.Material = "SmoothPlastic"
  108. Grip.Name = 'Grip'
  109. Grip.BottomSurface = "Smooth"
  110. Grip.FormFactor = "Custom" Grip.CanCollide = false
  111. Grip.BrickColor = BrickColor.new("Grey")
  112. Grip.Size = Vector3.new(0.400000006, 4, 0.400000006)
  113. local Gripweld = Instance.new("ManualWeld")
  114. Gripweld.Part0 = Handle Gripweld.Part1 = Grip Gripweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  115. Gripweld.C1 = CFrame.new(0.0500068665, 0.449998379, 5.96046448e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  116. Gripweld.Parent = Grip
  117. local GripMesh = Instance.new("CylinderMesh",Grip)
  118. GripMesh.Name = "Mesh"
  119. GripMesh.Offset = Vector3.new(0, 0, 0)
  120. GripMesh.Scale = Vector3.new(1, 1, 1)
  121.  
  122. local Down = Instance.new("WedgePart", game.Players.Rohan_Kishiba.Character)
  123. Down:BreakJoints()
  124. Down.TopSurface = "Smooth"
  125. Down.Material = "SmoothPlastic"
  126. Down.Name = 'Down'
  127. Down.BottomSurface = "Smooth"
  128. Down.FormFactor = "Custom" Down.CanCollide = false
  129. Down.BrickColor = BrickColor.new("Grey")
  130. Down.Size = Vector3.new(0.200000003, 1, 0.400000006)
  131. local Downweld = Instance.new("ManualWeld")
  132. Downweld.Part0 = Handle Downweld.Part1 = Down Downweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  133. Downweld.C1 = CFrame.new(0.0500155687, -1.95003223, 0.19999814, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  134. Downweld.Parent = Down
  135. local Connector = Instance.new("Part", game.Players.Rohan_Kishiba.Character)
  136. Connector:BreakJoints()
  137. Connector.TopSurface = "Smooth"
  138. Connector.Material = "SmoothPlastic"
  139. Connector.Name = 'Connector'
  140. Connector.Shape="Ball"
  141. Connector.BottomSurface = "Smooth"
  142. Connector.FormFactor = "Custom" Connector.CanCollide = false
  143. Connector.BrickColor = BrickColor.new("Grey")
  144. Connector.Size = Vector3.new(0.400000006, 0.400000006, 0.400000006)
  145. Connectorweld = Instance.new("ManualWeld")
  146. Connectorweld.Part0 = Handle Connectorweld.Part1 = Connector Connectorweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  147. Connectorweld.C1 = CFrame.new(0.0500068665, -1.55001354, 6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  148. Connectorweld.Parent = Connector
  149. local Up = Instance.new("WedgePart", game.Players.Rohan_Kishiba.Character)
  150. Up:BreakJoints()
  151. Up.TopSurface = "Smooth"
  152. Up.Material = "SmoothPlastic"
  153. Up.Name = 'Up'
  154. Up.BottomSurface = "Smooth"
  155. Up.FormFactor = "Custom" Up.CanCollide = false
  156. Up.BrickColor = BrickColor.new("Grey")
  157. Up.Size = Vector3.new(0.200000003, 1, 0.400000006)
  158. local Upweld = Instance.new("ManualWeld")
  159. Upweld.Part0 = Handle Upweld.Part1 = Up Upweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  160. Upweld.C1 = CFrame.new(-0.0500155687, -1.95002747, 0.200003147, -1, 0, 0, 0, 1, 0, -0, 0, -1)
  161. Upweld.Parent = Up
  162. Connector.Material="Metal"
  163. Grip.Material="Metal"
  164. Up.Material="Metal"
  165. Down.Material="Metal"
  166. Player=game:GetService("Players").Rohan_Kishiba
  167. Character=Player.Character
  168. Character.Animate:Destroy()
  169. PlayerGui=Player.PlayerGui
  170. Backpack=Player.Backpack
  171. Torso=Character.Torso
  172. Head=Character.Head
  173. Humanoid=Character.Humanoid
  174. Humanoid.WalkSpeed=32
  175. LeftArm=Character["Left Arm"]
  176. LeftLeg=Character["Left Leg"]
  177. RightArm=Character["Right Arm"]
  178. RightLeg=Character["Right Leg"]
  179. LS=Torso["Left Shoulder"]
  180. LH=Torso["Left Hip"]
  181. RS=Torso["Right Shoulder"]
  182. RH=Torso["Right Hip"]
  183. Neck=Torso.Neck
  184. it=Instance.new
  185. vt=Vector3.new
  186. cf=CFrame.new
  187. euler=CFrame.fromEulerAnglesXYZ
  188. angles=CFrame.Angles
  189. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  190. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  191. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  192. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  193. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  194. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  195. RootPart=Character.HumanoidRootPart
  196. RootJoint=RootPart.RootJoint
  197. RootCF=euler(-1.57,0,3.14)
  198. attack=false
  199. attackdebounce=false
  200. MMouse=nil
  201. combo=0
  202. local Anim="Idle"
  203. player=nil
  204. --save shoulders
  205. RSH, LSH=nil, nil
  206. --welds
  207. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  208. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  209. LH=Torso["Left Hip"]
  210. RH=Torso["Right Hip"]
  211.  
  212.  
  213. function clerp(a,b,t)
  214. local qa = {QuaternionFromCFrame(a)}
  215. local qb = {QuaternionFromCFrame(b)}
  216. local ax, ay, az = a.x, a.y, a.z
  217. local bx, by, bz = b.x, b.y, b.z
  218. local _t = 1-t
  219. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  220. end
  221.  
  222. function QuaternionFromCFrame(cf)
  223. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  224. local trace = m00 + m11 + m22
  225. if trace > 0 then
  226. local s = math.sqrt(1 + trace)
  227. local recip = 0.5/s
  228. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  229. else
  230. local i = 0
  231. if m11 > m00 then
  232. i = 1
  233. end
  234. if m22 > (i == 0 and m00 or m11) then
  235. i = 2
  236. end
  237. if i == 0 then
  238. local s = math.sqrt(m00-m11-m22+1)
  239. local recip = 0.5/s
  240. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  241. elseif i == 1 then
  242. local s = math.sqrt(m11-m22-m00+1)
  243. local recip = 0.5/s
  244. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  245. elseif i == 2 then
  246. local s = math.sqrt(m22-m00-m11+1)
  247. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  248. end
  249. end
  250. end
  251.  
  252. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  253. local xs, ys, zs = x + x, y + y, z + z
  254. local wx, wy, wz = w*xs, w*ys, w*zs
  255. local xx = x*xs
  256. local xy = x*ys
  257. local xz = x*zs
  258. local yy = y*ys
  259. local yz = y*zs
  260. local zz = z*zs
  261. 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))
  262. end
  263.  
  264. function QuaternionSlerp(a, b, t)
  265. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  266. local startInterp, finishInterp;
  267. if cosTheta >= 0.0001 then
  268. if (1 - cosTheta) > 0.0001 then
  269. local theta = math.acos(cosTheta)
  270. local invSinTheta = 1/math.sin(theta)
  271. startInterp = math.sin((1-t)*theta)*invSinTheta
  272. finishInterp = math.sin(t*theta)*invSinTheta
  273. else
  274. startInterp = 1-t
  275. finishInterp = t
  276. end
  277. else
  278. if (1+cosTheta) > 0.0001 then
  279. local theta = math.acos(-cosTheta)
  280. local invSinTheta = 1/math.sin(theta)
  281. startInterp = math.sin((t-1)*theta)*invSinTheta
  282. finishInterp = math.sin(t*theta)*invSinTheta
  283. else
  284. startInterp = t-1
  285. finishInterp = t
  286. end
  287. end
  288. 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
  289. end
  290. function swait(num)
  291. if num==0 or num==nil then
  292. game:service'RunService'.Stepped:wait()
  293. else
  294. for i=0,num do
  295. game:service'RunService'.Stepped:wait()
  296. end
  297. end
  298. end
  299. function weld(parent,part0,part1,c0)
  300. local weld=it("Weld")
  301. weld.Parent=parent
  302. weld.Part0=part0
  303. weld.Part1=part1
  304. weld.C0=c0
  305. return weld
  306. end
  307. local function rs()
  308. game:GetService("RunService").Stepped:wait()
  309. end
  310.  
  311. Plr = game.Players.Rohan_Kishiba
  312. P = Plr.Character
  313.  
  314. ch = P
  315. RSH=ch.Torso["Right Shoulder"]
  316. LSH=ch.Torso["Left Shoulder"]
  317. RF, LF=Instance.new("Weld"), Instance.new("Weld")
  318. --
  319. RSH.Parent=nil
  320. LSH.Parent=nil
  321. --
  322. RW.Name="Right Shoulder"
  323. RW.Part0=ch.Torso
  324. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  325. RW.C1=cf(0, 0.5, 0)
  326. RW.Part1=ch["Right Arm"]
  327. RW.Parent=P.Torso
  328. --
  329. LW.Name="Left Shoulder"
  330. LW.Part0=ch.Torso
  331. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  332. LW.C1=cf(0, 0.5, 0)
  333. LW.Part1=ch["Left Arm"]
  334. LW.Parent=P.Torso
  335. --
  336. RF.Name="Right Hip"
  337. RF.Part0=ch.Torso
  338. RF.C0=cf(.5, -1.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  339. RF.C1=cf(0, 0.5, 0)
  340. RF.Part1=ch["Right Leg"]
  341. RF.Parent=P.Torso
  342. --
  343. LF.Name="Left Hip"
  344. LF.Part0=ch.Torso
  345. LF.C0=cf(-.5, -1.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  346. LF.C1=cf(0, 0.5, 0)
  347. LF.Part1=ch["Left Leg"]
  348. LF.Parent=P.Torso
  349. RFC0 = RF.C0
  350. LFC0 = LF.C0
  351. RWC0 = CFrame.new(1.5, 0.5, 0, -0.945518613, -0.32556811, 0, 0.32556811, -0.945518613, 0, 0, 0, 1)
  352. LWC0 = CFrame.new(-1.05161786, 0.471444488, -0.853310168, 0.459834456, -0.887635231, -0.0256112181, 0.116241433, 0.08876127, -0.989246905, 0.880363643, 0.451912731, 0.143995479)
  353. TC0 = RootJoint.C0
  354. HC0 = Torso.Neck.C0
  355.  
  356. local Rads = 14
  357. local sine = 0
  358. local Arms = true
  359. local Legs = true
  360. local AttArm = 0
  361. local AttLeg = 0
  362. local Enabled = true
  363.  
  364. function Walk()
  365. if Arms then
  366. RW.C0=clerp(RW.C0,cf(1.5, 0.5, 0)*euler(-math.rad(50),0,math.rad(30)),.3)
  367. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(math.rad(15),0,0),.3)
  368. Handleweld.C1=clerp(Handleweld.C1,Handlecf*CFrame.Angles(0,math.rad(90),0),.3)
  369. LW.C0=clerp(LW.C0,cf(-1.5+math.abs(math.sin(-sine)*.233), 0.5, math.sin(sine)*.233)*euler(-math.sin(sine)/1.5*(Humanoid.WalkSpeed/13),0,-math.sin(sine)/3*(Humanoid.WalkSpeed/13)),.3)
  370. end
  371. if Legs then
  372. RF.C0=clerp(RF.C0,cf(.5, -1.5, math.sin(sine)*.233)*euler(-math.sin(sine)/2*((Humanoid.WalkSpeed+8)/24),0,0),.5)
  373. LF.C0=clerp(LF.C0,cf(-.5, -1.5, math.sin(-sine)*.233)*euler(-math.sin(-sine)/2*((Humanoid.WalkSpeed+8)/24),0,0),.5)
  374. end
  375. sine = sine + math.rad(Rads)
  376. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.3)
  377. end
  378. function Aim()
  379. RW.C0=clerp(RW.C0,CFrame.new(1.5, 0.5, 0, -0.945518613, -0.32556811, 0, 0.32556811, -0.945518613, 0, 0, 0, 1),.3)
  380. LW.C0=clerp(LW.C0,CFrame.new(-1.05161786, 0.471444488, -0.853310168, 0.459834456, -0.887635231, -0.0256112181, 0.116241433, 0.08876127, -0.989246905, 0.880363643, 0.451912731, 0.143995479),.3)
  381. RootJoint.C0=clerp(RootJoint.C0,TC0,.3)
  382. Handleweld.C1=clerp(Handleweld.C1,Handlecf,.3)
  383. Torso.Neck.C0=clerp(Torso.Neck.C0,HC0,.3)
  384. if Vector3.new(P.Torso.Velocity.x, 0, P.Torso.Velocity.z).magnitude > 3 and Legs then
  385. RF.C0=clerp(RF.C0,cf(.5, -1.5, math.sin(sine)*.233)*euler(-math.sin(sine)/2*((Humanoid.WalkSpeed+8)/24),0,0),.5)
  386. LF.C0=clerp(LF.C0,cf(-.5, -1.5, math.sin(-sine)*.233)*euler(-math.sin(-sine)/2*((Humanoid.WalkSpeed+8)/24),0,0),.5)
  387. sine = sine + math.rad(Rads)
  388. end
  389. end
  390. function Idle()
  391. if Arms then
  392. RW.C0=clerp(RW.C0,cf(1.5, 0.5, 0)*CFrame.new(0, 0, 0, 0.862729907, -0.5, -0.0754789189, 0.49809736, 0.866025388, -0.0435777754, 0.0871555507, 0, 0.99619472),.3)
  393. LW.C0=clerp(LW.C0,cf(-1.5, 0.5, 0)*CFrame.new(0, 0, 0, 0.173648223, 0.98480773, 0, -0.98480773, 0.173648223, 0, 0, 0, 1),.3)
  394. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0,0,-math.rad(70)),.3)
  395. Handleweld.C1=clerp(Handleweld.C1,Handlecf,.3)
  396. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,math.rad(70)),.3)
  397. end
  398. if Legs then
  399. RF.C0=clerp(RF.C0,RFC0*cf(0,0,0)*CFrame.new(0, -0, 0, 0.99619472, 0, -0.0871557817, 0, 1, 0, 0.0871557817, 0, 0.99619472),.3)
  400. LF.C0=clerp(LF.C0,LFC0*cf(0,0,0)*CFrame.new(0, -0, 0, 0.906307638, 0, 0.422618419, 0, 1, 0, -0.422618419, 0, 0.906307638),.3)
  401. end
  402. end
  403.  
  404. function Sound(ID,Par,Pitch,Vol)
  405. local Sound = Instance.new("Sound",Par)
  406. Sound.SoundId = "http://www.roblox.com/asset/?id="..tostring(ID)
  407. game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id="..tostring(ID))
  408. Sound.Pitch = Pitch
  409. Sound.Volume = Vol
  410. game.Debris:AddItem(Sound,Sound.TimeLength)
  411. rs()
  412. Sound:Play()
  413. end
  414. local aiming = false
  415. local Jumping = false
  416. local Jumpi = 0
  417.  
  418. game:GetService("RunService").Heartbeat:connect(function()
  419. if Jumping == true then
  420. Jumpi = Jumpi + 1
  421. if Arms then
  422. RW.C0=clerp(RW.C0,cf(1, 1, 0)*euler(0,0,math.pi/2+math.pi/4),.5)
  423. LW.C0=clerp(LW.C0,cf(-1, 1, 0)*euler(0,0,-math.pi/2-math.pi/4),.5)
  424. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(math.pi/16,0,0),.5)
  425. end
  426. if Legs then
  427. RF.C0=clerp(RF.C0,RFC0*cf(0,0,0)*euler(0,0,0),.5)
  428. LF.C0=clerp(LF.C0,LFC0*cf(0,.5,-.6)*euler(0,0,0),.5)
  429. end
  430. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.5)
  431. if Jumpi == 10 then
  432. Jumping = false
  433. Jumpi = 0
  434. end
  435. elseif Vector3.new(P.Torso.Velocity.x, 0, P.Torso.Velocity.z).magnitude < 3 then
  436. if aiming then
  437. Aim()
  438. else
  439. Idle()
  440. end
  441. elseif Vector3.new(P.Torso.Velocity.x, 0, P.Torso.Velocity.z).magnitude > 3 then
  442. if aiming then
  443. Aim()
  444. else
  445. Walk()
  446. end
  447. end
  448. end)
  449. P.Humanoid.Jumping:connect(function()
  450. if Arms == false and Legs == false then
  451. else
  452. Jumping = true
  453. end
  454. end)
  455. function hwait()
  456. game:GetService("RunService").Heartbeat:wait()
  457. end
  458. function Sound(ID,Par,Pitch,Vol)
  459. local Sound = Instance.new("Sound",Par)
  460. Sound.SoundId = "http://www.roblox.com/asset/?id="..tostring(ID)
  461. game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id="..tostring(ID))
  462. Sound.Pitch = Pitch
  463. Sound.Volume = Vol
  464. game.Debris:AddItem(Sound,Sound.TimeLength)
  465. rs()
  466. Sound:Play()
  467. end
  468. function Damage(Dmg,Part)
  469. local Child = Part
  470. local Par = Part.Parent
  471. if Par == workspace then
  472. elseif Par~=nil then
  473. repeat
  474. Child = Par
  475. Par = Par.Parent
  476. until Par == workspace
  477. end
  478. local Found = false
  479. function Search(c)
  480. coroutine.resume(coroutine.create(function()
  481. for i,v in pairs (c:GetChildren()) do
  482. if v:IsA("Humanoid") then
  483. for i = 1,10 do
  484. v.Health = v.Health - Dmg/10
  485. Found = true
  486. end
  487. end
  488. Search(v)
  489. end
  490. end))
  491. end
  492. if Child ~= P then
  493. Search(Child)
  494. end
  495. if Found == false then
  496. return false
  497. else
  498. return true
  499. end
  500. end
  501. neg={-1,1}
  502. Mouse.Button1Down:connect(function()
  503. if Enabled == true then
  504. Enabled = false
  505. Arms = false
  506. local Hit = false
  507. AttArm = AttArm + 1
  508. Handle.Touched:connect(function(part)
  509. if Hit == false then
  510. local Hitz = Damage(10,part)
  511. if Hitz == true then
  512. Hit = true
  513. end
  514. end
  515. end)
  516. if AttArm % 2 == 0 then
  517. for i = 0,1,0.05 do
  518. rs()
  519. RW.C0=clerp(RW.C0,CFrame.new(0.327810407, 0.426284045, -0.812734485, 0.499530673, 0.832429767, 0.23985371, -0.765840292, 0.553754687, -0.32687068, -0.404916912, -0.0204077363, 0.914125562),.3)
  520. LW.C0=clerp(LW.C0,cf(-1.5, 0.5, 0)*euler(0,0,-math.pi/16),.3)
  521. LW.C0=clerp(LW.C0,CFrame.new(-1.12515569, 0.390085489, -0.0568969324, 0.966400146, 0.0897351503, -0.240870312, -0.223289788, 0.757267952, -0.613748312, 0.127328619, 0.646910369, 0.751860738),.3)
  522. RF.C0=clerp(RF.C0,cf(.5, -1.5, 0)*euler(math.rad(30),0,0),.3)
  523. LF.C0=clerp(LF.C0,cf(-.5, -1.5, 0)*euler(-math.rad(30),0,0),.3)
  524. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.3)
  525. Handleweld.C1=clerp(Handleweld.C1,Handlecf*CFrame.new(0,0,1.5),.3)
  526. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(math.rad(0),0,0),.3)
  527.  
  528. end
  529. elseif AttArm % 2 == 1 then
  530. LW.C0=clerp(LW.C0,cf(-1.5, 0.5, 0)*euler(math.pi/2,0,0),1)
  531. for i = 0,1,0.05 do
  532. rs()
  533. RW.C0=clerp(RW.C0, CFrame.new(1.00035846, 0.481068671, 0, -0.838670492, -0.436109662, 0.326251596, 0.544639111, -0.671549916, 0.502383232, 0, 0.599023461, 0.80073148),.3)
  534. LW.C0=clerp(LW.C0,CFrame.new(0.418275297, 0.689788699, -0.483788908, -0.600420177, -0.779812098, 0.177168876, 0.799684703, -0.585499287, 0.133022174, 0, 0.221548468, 0.975149393),.3)
  535. RF.C0=clerp(RF.C0,cf(.5, -1.5, 0)*euler(-math.rad(30),0,0),.3)
  536. LF.C0=clerp(LF.C0,cf(-.5, -1.5, 0)*euler(math.rad(30),0,0),.3)
  537. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.3)
  538. Handleweld.C1=clerp(Handleweld.C1,Handlecf*CFrame.new(0,0,1.5),.3)
  539. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(math.rad(0),0,0),.3)
  540.  
  541. end
  542. end
  543. Enabled=true
  544. Arms=true
  545. end
  546. end)
  547.  
  548. Mouse.KeyDown:connect(function(key)
  549. if key=="f" then
  550. aiming=true
  551. Arms=false
  552. Sound(1306070008,Character.Torso,1,1)
  553. elseif key=="r" then
  554. local hint = Instance.new("Part",workspace)
  555. hint.Shape="Cylinder"
  556. Sound(1306070008,hint,1,1)
  557. hint.Anchored=true
  558. hint.CanCollide=false
  559. hint.Material="Neon"
  560. hint.Transparency=1
  561. hint.BrickColor=BrickColor.new("Institutional white")
  562. hint.Size=Vector3.new(.2,4,4)
  563. hint.CFrame=CFrame.new(Mouse.Hit.p)*CFrame.Angles(0,0,math.rad(90))
  564. for i = 1,30 do
  565. rs()
  566. hint.Transparency=1-i/30
  567. end
  568. local spear = Handle:Clone()
  569. spear.Anchored=true
  570. Connector:Clone().Parent=spear
  571. Up:Clone().Parent=spear
  572. Down:Clone().Parent=spear
  573. Grip:Clone().Parent=spear
  574. for i,v in pairs(spear:children'') do if v:IsA("BasePart") then v.Anchored=true else v:Remove() end end
  575. local parts = {spear.Connector,spear.Up,spear.Down,spear.Grip}
  576. local cframes = {CFrame.new(0.0500068665, -1.55001354, 6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0500155687, -1.95002747, 0.200003147, -1, 0, 0, 0, 1, 0, -0, 0, -1),CFrame.new(0.0500155687, -1.95003223, 0.19999814, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0500068665, 0.449998379, 5.96046448e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)}
  577. spear.CFrame=CFrame.new((hint.CFrame*CFrame.new(-5,0,0)).p)
  578. spear.Parent=workspace
  579. spear.Touched:connect(function(v)
  580. if v.Parent~=nil then
  581. if v.Parent:FindFirstChild("Humanoid") and v.Parent~=Character then
  582. v.Parent.Humanoid.Health=v.Parent.Humanoid.Health-10
  583. end
  584. end
  585. end)
  586. for _,v in pairs(parts) do
  587. v.CFrame=spear.CFrame*cframes[_]:inverse()
  588. end
  589. for i = 1,10 do
  590. rs()
  591. spear.CFrame=spear.CFrame*CFrame.new(0,0.7,0)
  592. for _,v in pairs(parts) do
  593. v.CFrame=spear.CFrame*cframes[_]:inverse()
  594. end
  595. end
  596. spawn(function()
  597. wait(.5)
  598. spear:Destroy()
  599. Handleweld = Instance.new("ManualWeld")
  600. Handleweld.Part0 = game.Players.Rohan_Kishiba.Character["Right Arm"]
  601. Handleweld.Part1 = Character.Handle Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  602. Handleweld.C1 = CFrame.new(-0.0500130653, -0.15998745, 0.999988556, 1, 0, 0, 0, 0, -1, 0, 0.999999881, 0)
  603. Handleweld.Parent = game.Players.Rohan_Kishiba.Character["Right Arm"]
  604. hint:Remove()
  605. end)
  606. end
  607. end)
  608.  
  609. local enabled=true
  610. Mouse.KeyUp:connect(function(key)
  611. if key=="f" and enabled then
  612. aiming=false
  613. enabled=false
  614. Handleweld:Destroy()
  615. local temp = Handle
  616. temp.CanCollide=true
  617. local parts = {Connector,Up,Down,Grip}
  618. local cframes = {Connectorweld.C1,Upweld.C1,Downweld.C1,Gripweld.C1}
  619. local init = Mouse.Hit.p
  620. local dir = init - temp.Position
  621. for i,v in pairs(parts) do v.Anchored=true end Handle.Anchored=true
  622. spawn(function()
  623. for i = 1,200 do
  624. rs()
  625. for _,v in pairs(temp:GetTouchingParts()) do
  626. if v.Parent~=nil then
  627. if v.Parent:FindFirstChild("Humanoid") and v.Parent~=Character then
  628. v.Parent.Humanoid.Health=v.Parent.Humanoid.Health-5
  629. end
  630. end
  631. end
  632. local Distance = (init-temp.Position).magnitude
  633. if Distance > 2 then Distance = 2 end
  634. temp.CFrame = CFrame.new(temp.Position,init) * CFrame.new(0,0,-Distance) * CFrame.Angles(math.rad(-90),math.rad(90),0)
  635. for _,v in pairs(parts) do
  636. v.CFrame=temp.CFrame*cframes[_]:inverse()
  637. end
  638. end
  639. temp:Remove()
  640. for i,v in pairs(parts) do v:Remove() end
  641. end)
  642. for i = 1,10 do
  643. rs()
  644. RW.C0=clerp(RWC0,CFrame.new(1.5, 0.5, 0, -0.969445348, 0.175265431, 0.171632558, 0.245307371, 0.692642331, 0.678285301, 0, 0.699663281, -0.714472771),i/10)
  645. LW.C0=clerp(LWC0,CFrame.new(-1.5, 0.5, 0, 0.880477369, 0.474088192, 0, -0.0928957462, 0.172526136, -0.980614662, -0.464897841, 0.863409042, 0.195946127),i/10)
  646. end
  647. enabled=true
  648. Arms=true
  649. Handle = Instance.new("Part", game.Players.Rohan_Kishiba.Character)
  650. Handle:BreakJoints()
  651. Handle.TopSurface = "Smooth"
  652. Handle.Material = "SmoothPlastic"
  653. Handle.Name = 'Handle'
  654. Handle.Transparency=1
  655. Handle.BottomSurface = "Smooth"
  656. Handle.FormFactor = "Custom" Handle.CanCollide = false
  657. Handle.BrickColor = BrickColor.new("Medium stone grey")
  658. Handle.Size = Vector3.new(0.5, 4.9000001, 0.799999833)
  659. Handleweld = Instance.new("ManualWeld")
  660. Handleweld.Part0 = game.Players.Rohan_Kishiba.Character["Right Arm"]
  661. Handleweld.Part1 = Handle Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  662. Handleweld.C1 = CFrame.new(-0.0500130653, -0.15998745, 0.999988556, 1, 0, 0, 0, 0, -1, 0, 0.999999881, 0)
  663. Handleweld.Parent = game.Players.Rohan_Kishiba.Character["Right Arm"]
  664. staffweld=Handleweld
  665. Handlecf=Handleweld.C1
  666. Grip = Instance.new("Part", game.Players.Rohan_Kishiba.Character)
  667. Grip:BreakJoints()
  668. Grip.TopSurface = "Smooth"
  669. Grip.Material = "SmoothPlastic"
  670. Grip.Name = 'Grip'
  671. Grip.BottomSurface = "Smooth"
  672. Grip.FormFactor = "Custom" Grip.CanCollide = false
  673. Grip.BrickColor = BrickColor.new("Grey")
  674. Grip.Size = Vector3.new(0.400000006, 4, 0.400000006)
  675. Gripweld = Instance.new("ManualWeld")
  676. Gripweld.Part0 = Handle Gripweld.Part1 = Grip Gripweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  677. Gripweld.C1 = CFrame.new(0.0500068665, 0.449998379, 5.96046448e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  678. Gripweld.Parent = Grip
  679. GripMesh = Instance.new("CylinderMesh",Grip)
  680. GripMesh.Name = "Mesh"
  681. GripMesh.Offset = Vector3.new(0, 0, 0)
  682. GripMesh.Scale = Vector3.new(1, 1, 1)
  683.  
  684. Down = Instance.new("WedgePart", game.Players.Rohan_Kishiba.Character)
  685. Down:BreakJoints()
  686. Down.TopSurface = "Smooth"
  687. Down.Material = "SmoothPlastic"
  688. Down.Name = 'Down'
  689. Down.BottomSurface = "Smooth"
  690. Down.FormFactor = "Custom" Down.CanCollide = false
  691. Down.BrickColor = BrickColor.new("Grey")
  692. Down.Size = Vector3.new(0.200000003, 1, 0.400000006)
  693. Downweld = Instance.new("ManualWeld")
  694. Downweld.Part0 = Handle Downweld.Part1 = Down Downweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  695. Downweld.C1 = CFrame.new(0.0500155687, -1.95003223, 0.19999814, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  696. Downweld.Parent = Down
  697. Connector = Instance.new("Part", game.Players.Rohan_Kishiba.Character)
  698. Connector:BreakJoints()
  699. Connector.TopSurface = "Smooth"
  700. Connector.Material = "SmoothPlastic"
  701. Connector.Name = 'Connector'
  702. Connector.Shape="Ball"
  703. Connector.BottomSurface = "Smooth"
  704. Connector.FormFactor = "Custom" Connector.CanCollide = false
  705. Connector.BrickColor = BrickColor.new("Grey")
  706. Connector.Size = Vector3.new(0.400000006, 0.400000006, 0.400000006)
  707. Connectorweld = Instance.new("ManualWeld")
  708. Connectorweld.Part0 = Handle Connectorweld.Part1 = Connector Connectorweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  709. Connectorweld.C1 = CFrame.new(0.0500068665, -1.55001354, 6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  710. Connectorweld.Parent = Connector
  711. Up = Instance.new("WedgePart", game.Players.Rohan_Kishiba.Character)
  712. Up:BreakJoints()
  713. Up.TopSurface = "Smooth"
  714. Up.Material = "SmoothPlastic"
  715. Up.Name = 'Up'
  716. Up.BottomSurface = "Smooth"
  717. Up.FormFactor = "Custom" Up.CanCollide = false
  718. Up.BrickColor = BrickColor.new("Grey")
  719. Up.Size = Vector3.new(0.200000003, 1, 0.400000006)
  720. Upweld = Instance.new("ManualWeld")
  721. Upweld.Part0 = Handle Upweld.Part1 = Up Upweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  722. Upweld.C1 = CFrame.new(-0.0500155687, -1.95002747, 0.200003147, -1, 0, 0, 0, 1, 0, -0, 0, -1)
  723. Upweld.Parent = Up
  724. Connector.Material="Metal"
  725. Grip.Material="Metal"
  726. Up.Material="Metal"
  727. Down.Material="Metal"
  728. end
  729. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement