Advertisement
Zach_script_stealer2

Undyne's Polearm

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