Tetezaza1542

undyne

Aug 15th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.75 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. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  5. local Handle = Instance.new("Part", game.Players.LocalPlayer.Character)
  6. Handle:BreakJoints()
  7. Handle.TopSurface = "Smooth"
  8. Handle.Material = "SmoothPlastic"
  9. Handle.Name = 'Handle'
  10. Handle.Transparency=1
  11. Handle.BottomSurface = "Smooth"
  12. Handle.FormFactor = "Custom" Handle.CanCollide = false
  13. Handle.BrickColor = BrickColor.new("Medium stone grey")
  14. Handle.Size = Vector3.new(0.5, 4.9000001, 0.799999833)
  15. local Handleweld = Instance.new("ManualWeld")
  16. Handleweld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  17. Handleweld.Part1 = Handle Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  18. Handleweld.C1 = CFrame.new(-0.0500130653, -0.15998745, 0.999988556, 1, 0, 0, 0, 0, -1, 0, 0.999999881, 0)
  19. Handleweld.Parent = game.Players.LocalPlayer.Character["Right Arm"]
  20. staffweld=Handleweld
  21. Handlecf=Handleweld.C1
  22. local Grip = Instance.new("Part", game.Players.LocalPlayer.Character)
  23. Grip:BreakJoints()
  24. Grip.TopSurface = "Smooth"
  25. Grip.Material = "SmoothPlastic"
  26. Grip.Name = 'Grip'
  27. Grip.BottomSurface = "Smooth"
  28. Grip.FormFactor = "Custom" Grip.CanCollide = false
  29. Grip.BrickColor = BrickColor.new("Toothpaste")
  30. Grip.Size = Vector3.new(0.400000006, 4, 0.400000006)
  31. local Gripweld = Instance.new("ManualWeld")
  32. Gripweld.Part0 = Handle Gripweld.Part1 = Grip Gripweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  33. Gripweld.C1 = CFrame.new(0.0500068665, 0.449998379, 5.96046448e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  34. Gripweld.Parent = Grip
  35. local GripMesh = Instance.new("CylinderMesh",Grip)
  36. GripMesh.Name = "Mesh"
  37. GripMesh.Offset = Vector3.new(0, 0, 0)
  38. GripMesh.Scale = Vector3.new(1, 1, 1)
  39.  
  40. local Down = Instance.new("WedgePart", game.Players.LocalPlayer.Character)
  41. Down:BreakJoints()
  42. Down.TopSurface = "Smooth"
  43. Down.Material = "SmoothPlastic"
  44. Down.Name = 'Down'
  45. Down.BottomSurface = "Smooth"
  46. Down.FormFactor = "Custom" Down.CanCollide = false
  47. Down.BrickColor = BrickColor.new("Toothpaste")
  48. Down.Size = Vector3.new(0.200000003, 1, 0.400000006)
  49. local Downweld = Instance.new("ManualWeld")
  50. Downweld.Part0 = Handle Downweld.Part1 = Down Downweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  51. Downweld.C1 = CFrame.new(0.0500155687, -1.95003223, 0.19999814, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  52. Downweld.Parent = Down
  53. local Connector = Instance.new("Part", game.Players.LocalPlayer.Character)
  54. Connector:BreakJoints()
  55. Connector.TopSurface = "Smooth"
  56. Connector.Material = "SmoothPlastic"
  57. Connector.Name = 'Connector'
  58. Connector.Shape="Ball"
  59. Connector.BottomSurface = "Smooth"
  60. Connector.FormFactor = "Custom" Connector.CanCollide = false
  61. Connector.BrickColor = BrickColor.new("Toothpaste")
  62. Connector.Size = Vector3.new(0.400000006, 0.400000006, 0.400000006)
  63. Connectorweld = Instance.new("ManualWeld")
  64. Connectorweld.Part0 = Handle Connectorweld.Part1 = Connector Connectorweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  65. Connectorweld.C1 = CFrame.new(0.0500068665, -1.55001354, 6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  66. Connectorweld.Parent = Connector
  67. local Up = Instance.new("WedgePart", game.Players.LocalPlayer.Character)
  68. Up:BreakJoints()
  69. Up.TopSurface = "Smooth"
  70. Up.Material = "SmoothPlastic"
  71. Up.Name = 'Up'
  72. Up.BottomSurface = "Smooth"
  73. Up.FormFactor = "Custom" Up.CanCollide = false
  74. Up.BrickColor = BrickColor.new("Toothpaste")
  75. Up.Size = Vector3.new(0.200000003, 1, 0.400000006)
  76. local Upweld = Instance.new("ManualWeld")
  77. Upweld.Part0 = Handle Upweld.Part1 = Up Upweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  78. Upweld.C1 = CFrame.new(-0.0500155687, -1.95002747, 0.200003147, -1, 0, 0, 0, 1, 0, -0, 0, -1)
  79. Upweld.Parent = Up
  80. Connector.Material="Neon"
  81. Grip.Material="Neon"
  82. Up.Material="Neon"
  83. Down.Material="Neon"
  84. Player=game:GetService("Players").LocalPlayer
  85. Character=Player.Character
  86. Character.Animate:Destroy()
  87. PlayerGui=Player.PlayerGui
  88. Backpack=Player.Backpack
  89. Torso=Character.Torso
  90. Head=Character.Head
  91. Humanoid=Character.Humanoid
  92. Humanoid.WalkSpeed=32
  93. LeftArm=Character["Left Arm"]
  94. LeftLeg=Character["Left Leg"]
  95. RightArm=Character["Right Arm"]
  96. RightLeg=Character["Right Leg"]
  97. LS=Torso["Left Shoulder"]
  98. LH=Torso["Left Hip"]
  99. RS=Torso["Right Shoulder"]
  100. RH=Torso["Right Hip"]
  101. Neck=Torso.Neck
  102. it=Instance.new
  103. vt=Vector3.new
  104. cf=CFrame.new
  105. euler=CFrame.fromEulerAnglesXYZ
  106. angles=CFrame.Angles
  107. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  108. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  109. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  110. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  111. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  112. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  113. RootPart=Character.HumanoidRootPart
  114. RootJoint=RootPart.RootJoint
  115. RootCF=euler(-1.57,0,3.14)
  116. attack=false
  117. attackdebounce=false
  118. MMouse=nil
  119. combo=0
  120. local Anim="Idle"
  121. player=nil
  122. --save shoulders
  123. RSH, LSH=nil, nil
  124. --welds
  125. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  126. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  127. LH=Torso["Left Hip"]
  128. RH=Torso["Right Hip"]
  129. Head.Running.SoundId="rbxassetid://696796643"
  130. Instance.new("PitchShiftSoundEffect",Character.Head.Running).Octave=0.5
  131. function clerp(a,b,t)
  132. local qa = {QuaternionFromCFrame(a)}
  133. local qb = {QuaternionFromCFrame(b)}
  134. local ax, ay, az = a.x, a.y, a.z
  135. local bx, by, bz = b.x, b.y, b.z
  136. local _t = 1-t
  137. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  138. end
  139.  
  140. function QuaternionFromCFrame(cf)
  141. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  142. local trace = m00 + m11 + m22
  143. if trace > 0 then
  144. local s = math.sqrt(1 + trace)
  145. local recip = 0.5/s
  146. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  147. else
  148. local i = 0
  149. if m11 > m00 then
  150. i = 1
  151. end
  152. if m22 > (i == 0 and m00 or m11) then
  153. i = 2
  154. end
  155. if i == 0 then
  156. local s = math.sqrt(m00-m11-m22+1)
  157. local recip = 0.5/s
  158. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  159. elseif i == 1 then
  160. local s = math.sqrt(m11-m22-m00+1)
  161. local recip = 0.5/s
  162. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  163. elseif i == 2 then
  164. local s = math.sqrt(m22-m00-m11+1)
  165. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  166. end
  167. end
  168. end
  169.  
  170. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  171. local xs, ys, zs = x + x, y + y, z + z
  172. local wx, wy, wz = w*xs, w*ys, w*zs
  173. local xx = x*xs
  174. local xy = x*ys
  175. local xz = x*zs
  176. local yy = y*ys
  177. local yz = y*zs
  178. local zz = z*zs
  179. 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))
  180. end
  181.  
  182. function QuaternionSlerp(a, b, t)
  183. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  184. local startInterp, finishInterp;
  185. if cosTheta >= 0.0001 then
  186. if (1 - cosTheta) > 0.0001 then
  187. local theta = math.acos(cosTheta)
  188. local invSinTheta = 1/math.sin(theta)
  189. startInterp = math.sin((1-t)*theta)*invSinTheta
  190. finishInterp = math.sin(t*theta)*invSinTheta
  191. else
  192. startInterp = 1-t
  193. finishInterp = t
  194. end
  195. else
  196. if (1+cosTheta) > 0.0001 then
  197. local theta = math.acos(-cosTheta)
  198. local invSinTheta = 1/math.sin(theta)
  199. startInterp = math.sin((t-1)*theta)*invSinTheta
  200. finishInterp = math.sin(t*theta)*invSinTheta
  201. else
  202. startInterp = t-1
  203. finishInterp = t
  204. end
  205. end
  206. 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
  207. end
  208. function swait(num)
  209. if num==0 or num==nil then
  210. game:service'RunService'.RenderStepped:wait()
  211. else
  212. for i=0,num do
  213. game:service'RunService'.RenderStepped:wait()
  214. end
  215. end
  216. end
  217. function weld(parent,part0,part1,c0)
  218. local weld=it("Weld")
  219. weld.Parent=parent
  220. weld.Part0=part0
  221. weld.Part1=part1
  222. weld.C0=c0
  223. return weld
  224. end
  225. local function rs()
  226. game:GetService("RunService").RenderStepped:wait()
  227. end
  228.  
  229. Plr = game.Players.LocalPlayer
  230. P = Plr.Character
  231. Mouse = Plr:GetMouse()
  232.  
  233. ch = P
  234. RSH=ch.Torso["Right Shoulder"]
  235. LSH=ch.Torso["Left Shoulder"]
  236. RF, LF=Instance.new("Weld"), Instance.new("Weld")
  237. --
  238. RSH.Parent=nil
  239. LSH.Parent=nil
  240. --
  241. RW.Name="Right Shoulder"
  242. RW.Part0=ch.Torso
  243. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  244. RW.C1=cf(0, 0.5, 0)
  245. RW.Part1=ch["Right Arm"]
  246. RW.Parent=P.Torso
  247. --
  248. LW.Name="Left Shoulder"
  249. LW.Part0=ch.Torso
  250. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  251. LW.C1=cf(0, 0.5, 0)
  252. LW.Part1=ch["Left Arm"]
  253. LW.Parent=P.Torso
  254. --
  255. RF.Name="Right Hip"
  256. RF.Part0=ch.Torso
  257. RF.C0=cf(.5, -1.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  258. RF.C1=cf(0, 0.5, 0)
  259. RF.Part1=ch["Right Leg"]
  260. RF.Parent=P.Torso
  261. --
  262. LF.Name="Left Hip"
  263. LF.Part0=ch.Torso
  264. LF.C0=cf(-.5, -1.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  265. LF.C1=cf(0, 0.5, 0)
  266. LF.Part1=ch["Left Leg"]
  267. LF.Parent=P.Torso
  268. RFC0 = RF.C0
  269. LFC0 = LF.C0
  270. RWC0 = CFrame.new(1.5, 0.5, 0, -0.945518613, -0.32556811, 0, 0.32556811, -0.945518613, 0, 0, 0, 1)
  271. 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)
  272. TC0 = RootJoint.C0
  273. HC0 = Torso.Neck.C0
  274.  
  275. local Rads = 14
  276. local sine = 0
  277. local Arms = true
  278. local Legs = true
  279. local AttArm = 0
  280. local AttLeg = 0
  281. local Enabled = true
  282.  
  283. function Walk()
  284. if Arms then
  285. RW.C0=clerp(RW.C0,cf(1.5, 0.5, 0)*euler(-math.rad(50),0,math.rad(30)),.3)
  286. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(math.rad(15),0,0),.3)
  287. Handleweld.C1=clerp(Handleweld.C1,Handlecf*CFrame.Angles(0,math.rad(90),0),.3)
  288. 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)
  289. end
  290. if Legs then
  291. 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)
  292. 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)
  293. end
  294. sine = sine + math.rad(Rads)
  295. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.3)
  296. end
  297. function Aim()
  298. 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)
  299. 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)
  300. RootJoint.C0=clerp(RootJoint.C0,TC0,.3)
  301. Handleweld.C1=clerp(Handleweld.C1,Handlecf,.3)
  302. Torso.Neck.C0=clerp(Torso.Neck.C0,HC0,.3)
  303. if Vector3.new(P.Torso.Velocity.x, 0, P.Torso.Velocity.z).magnitude > 3 and Legs then
  304. 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)
  305. 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)
  306. sine = sine + math.rad(Rads)
  307. end
  308. end
  309. function Idle()
  310. if Arms then
  311. 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)
  312. 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)
  313. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0,0,-math.rad(70)),.3)
  314. Handleweld.C1=clerp(Handleweld.C1,Handlecf,.3)
  315. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,math.rad(70)),.3)
  316. end
  317. if Legs then
  318. 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)
  319. 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)
  320. end
  321. end
  322.  
  323. function Sound(ID,Par,Pitch,Vol)
  324. local Sound = Instance.new("Sound",Par)
  325. Sound.SoundId = "http://www.roblox.com/asset/?id="..tostring(ID)
  326. game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id="..tostring(ID))
  327. Sound.Pitch = Pitch
  328. Sound.Volume = Vol
  329. game.Debris:AddItem(Sound,Sound.TimeLength)
  330. rs()
  331. Sound:Play()
  332. end
  333. local aiming = false
  334. local Jumping = false
  335. local Jumpi = 0
  336.  
  337. game:GetService("RunService").Heartbeat:connect(function()
  338. if Jumping == true then
  339. Jumpi = Jumpi + 1
  340. if Arms then
  341. RW.C0=clerp(RW.C0,cf(1, 1, 0)*euler(0,0,math.pi/2+math.pi/4),.5)
  342. LW.C0=clerp(LW.C0,cf(-1, 1, 0)*euler(0,0,-math.pi/2-math.pi/4),.5)
  343. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(math.pi/16,0,0),.5)
  344. end
  345. if Legs then
  346. RF.C0=clerp(RF.C0,RFC0*cf(0,0,0)*euler(0,0,0),.5)
  347. LF.C0=clerp(LF.C0,LFC0*cf(0,.5,-.6)*euler(0,0,0),.5)
  348. end
  349. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.5)
  350. if Jumpi == 10 then
  351. Jumping = false
  352. Jumpi = 0
  353. end
  354. elseif Vector3.new(P.Torso.Velocity.x, 0, P.Torso.Velocity.z).magnitude < 3 then
  355. if aiming then
  356. Aim()
  357. else
  358. Idle()
  359. end
  360. elseif Vector3.new(P.Torso.Velocity.x, 0, P.Torso.Velocity.z).magnitude > 3 then
  361. if aiming then
  362. Aim()
  363. else
  364. Walk()
  365. end
  366. end
  367. end)
  368. P.Humanoid.Jumping:connect(function()
  369. if Arms == false and Legs == false then
  370. else
  371. Jumping = true
  372. end
  373. end)
  374. function hwait()
  375. game:GetService("RunService").Heartbeat:wait()
  376. end
  377. function Sound(ID,Par,Pitch,Vol)
  378. local Sound = Instance.new("Sound",Par)
  379. Sound.SoundId = "http://www.roblox.com/asset/?id="..tostring(ID)
  380. game:GetService("ContentProvider"):Preload("rbxassetid://"..tostring(ID))
  381. Sound.Pitch = Pitch
  382. Sound.Volume = Vol
  383. wait()
  384. game.Debris:AddItem(Sound,Sound.TimeLength)
  385. rs()
  386. Sound:Play()
  387. return Sound
  388. end
  389. function Damage(Dmg,Part)
  390. local Child = Part
  391. local Par = Part.Parent
  392. if Par == workspace then
  393. elseif Par~=nil then
  394. repeat
  395. Child = Par
  396. Par = Par.Parent
  397. until Par == workspace
  398. end
  399. local Found = false
  400. function Search(c)
  401. coroutine.resume(coroutine.create(function()
  402. for i,v in pairs (c:GetChildren()) do
  403. if v:IsA("Humanoid") then
  404. for i = 1,10 do
  405. v.Health = v.Health - Dmg/10
  406. Found = true
  407. end
  408. end
  409. Search(v)
  410. end
  411. end))
  412. end
  413. if Child ~= P then
  414. Search(Child)
  415. end
  416. if Found == false then
  417. return false
  418. else
  419. return true
  420. end
  421. end
  422. neg={-1,1}
  423. Mouse.Button1Down:connect(function()
  424. if Enabled == true then
  425. Enabled = false
  426. Arms = false
  427. local Hit = false
  428. AttArm = AttArm + 1
  429. Handle.Touched:connect(function(part)
  430. if Hit == false then
  431. local Hitz = Damage(10,part)
  432. if Hitz == true then
  433. Hit = true
  434. end
  435. end
  436. end)
  437. if AttArm % 2 == 0 then
  438. for i = 0,1,0.05 do
  439. rs()
  440. 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)
  441. LW.C0=clerp(LW.C0,cf(-1.5, 0.5, 0)*euler(0,0,-math.pi/16),.3)
  442. 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)
  443. RF.C0=clerp(RF.C0,cf(.5, -1.5, 0)*euler(math.rad(30),0,0),.3)
  444. LF.C0=clerp(LF.C0,cf(-.5, -1.5, 0)*euler(-math.rad(30),0,0),.3)
  445. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.3)
  446. Handleweld.C1=clerp(Handleweld.C1,Handlecf*CFrame.new(0,0,1.5),.3)
  447. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(math.rad(0),0,0),.3)
  448.  
  449. end
  450. elseif AttArm % 2 == 1 then
  451. LW.C0=clerp(LW.C0,cf(-1.5, 0.5, 0)*euler(math.pi/2,0,0),1)
  452. for i = 0,1,0.05 do
  453. rs()
  454. 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)
  455. 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)
  456. RF.C0=clerp(RF.C0,cf(.5, -1.5, 0)*euler(-math.rad(30),0,0),.3)
  457. LF.C0=clerp(LF.C0,cf(-.5, -1.5, 0)*euler(math.rad(30),0,0),.3)
  458. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.3)
  459. Handleweld.C1=clerp(Handleweld.C1,Handlecf*CFrame.new(0,0,1.5),.3)
  460. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(math.rad(0),0,0),.3)
  461.  
  462. end
  463. end
  464. Hit=true
  465. Enabled=true
  466. Arms=true
  467. end
  468. end)
  469. Handle.Archivable=true
  470. Character.Sound.Parent=Character.Head
  471. --battle against a true hero, spear of justice, run, undyne, sharax, game over
  472. songs = {333552980,344965733,320307291,322427044,582376765,326810807,392344547}
  473. songtitles = {"Battle Against a True Hero","Spear of Justice","Run!","Undyne","SharaX's Battle Against a True Hero","Soul break","Game Over"}
  474. k=0
  475. spears={}
  476. Mouse.KeyDown:connect(function(key)
  477. if key=="f" then
  478. aiming=true
  479. Arms=false
  480. wait(.3)
  481. Sound(334702864,Character.Torso,1,1)
  482. if Character.Humanoid.Health<=50 and Handle~=nil then
  483. for offset = 1, 5 do
  484. Handleweld.Parent=nil
  485. Upweld.Parent=nil
  486. Downweld.Parent=nil
  487. Gripweld.Parent=nil
  488. Connectorweld.Parent=nil
  489. Handle:BreakJoints()
  490. local spear = Handle:Clone()
  491. Upweld.Parent=Handle
  492. Downweld.Parent=Handle
  493. Gripweld.Parent=Handle
  494. Connectorweld.Parent=Handle
  495. Handleweld.Parent=Handle
  496. spear:BreakJoints()
  497. spear.Anchored=true
  498. Connector:Clone().Parent=spear
  499. Up:Clone().Parent=spear
  500. Down:Clone().Parent=spear
  501. Grip:Clone().Parent=spear
  502. for i,v in pairs(spear:children'') do if v:IsA("BasePart") then v.Anchored=true else v:Remove() end end
  503. local parts = {spear.Connector,spear.Up,spear.Down,spear.Grip}
  504. 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)}
  505. spear.CFrame=Handle.CFrame*CFrame.new(math.random(2,6),0,math.random(2,6)*-1)
  506. spear.Parent=workspace
  507. for _,v in pairs(parts) do
  508. v.CFrame=spear.CFrame*cframes[_]:inverse()
  509. end
  510. table.insert(spears,spear)
  511. end
  512. end
  513. elseif key=="t" then
  514. Arms=false
  515. for i=1,3 do
  516. for erp = 1,10 do
  517. RW.C0=clerp(RW.C0,CFrame.new(1.5, 0.5, 0, 0.153277263, -0.283480376, -0.946649313, 0.879648566, 0.475624204, 0, 0.450249314, -0.83271873, 0.322265476),erp/10)
  518. LW.C0=clerp(LW.C0,CFrame.new(-1.39469635, 0.517272592, -0.170228422, 0.937898338, -0.299321532, 0.175366715, 0.169711918, -0.0450018011, -0.984465718, 0.302563637, 0.953090549, 0.00859132782),erp/10)
  519. Handleweld.C1=clerp(Handleweld.C1,Handlecf,erp/10)
  520. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(math.rad(0),0,0),erp/10)
  521. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),erp/10)
  522. rs()
  523. end
  524. Hit = false
  525. Handle.Touched:connect(function(part)
  526. if Hit == false then
  527. local Hitz = Damage(10,part)
  528. if Hitz == true then
  529. Hit = true
  530. end
  531. end
  532. end)
  533. for erp = 1,10 do
  534. if i==1 then
  535. RW.C0=clerp(RW.C0,CFrame.new(1.5, 0.5, 0, 0.674811959, 0.700760841, 0.231437087, -0.0440065488, 0.351255953, -0.935244679, -0.736676514, 0.620929599, 0.26786983),erp/10)
  536. elseif i==2 then
  537. RW.C0=clerp(RW.C0,CFrame.new(1.5, 0.5, 0, 0.920771599, 0.388925076, -0.0302828625, 0.0161895473, -0.115658574, -0.993157089, -0.389766157, 0.913980544, -0.112791643),erp/10)
  538. else
  539. RW.C0=clerp(RW.C0,CFrame.new(1.5, 0.5, 0, 0.868244171, 0.476193607, 0.13925457, 0.0297700949, 0.230168059, -0.97269541, -0.495243251, 0.848682761, 0.185665786),erp/10)
  540. end
  541. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,math.rad(-40)),erp/10)
  542. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0,0,math.rad(40)),erp/10)
  543. LW.C0=clerp(LW.C0,CFrame.new(-1.5, 0.5, 0, 0.210330695, 0.29751879, 0.931259096, -0.398629963, 0.895882845, -0.196183711, -0.892667413, -0.32996431, 0.307031572),erp/10)
  544. Handleweld.C1=clerp(Handleweld.C1,Handlecf*CFrame.Angles(math.rad(70),0,0)*CFrame.new(0,1,2),erp/10)
  545. rs()
  546. end
  547. Hit=true
  548. end
  549. Arms=true
  550. elseif key=="p" then
  551. k=k+1
  552. if k>#songs then k=1 end
  553. print(songtitles[k])
  554. elseif key=="v" then
  555. Arms=false
  556. local push = true
  557. Character["Left Arm"].Touched:connect(function(op)
  558. if push then
  559. if op:IsA("BasePart") then
  560. op.Velocity=Character.HumanoidRootPart.CFrame.lookVector*250
  561. push=false
  562. if op.Parent~=nil then
  563. if op.Parent:FindFirstChild("Humanoid") then
  564. op.Parent.Humanoid.Health=op.Parent.Humanoid.Health-10
  565. end
  566. end
  567. end
  568. end
  569. end)
  570. for erp=1,10 do
  571. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,math.rad(20)),erp/10)
  572. RootJoint.C0=clerp(RootJoint.C0,RootCF*CFrame.Angles(0,0,math.rad(-20)),erp/10)
  573. RW.C0=clerp(RW.C0,CFrame.new(1.5, 0.5, 0, 0.321100682, -0.192936763, -0.927183747, 0.515038073, 0.857167304, 0, 0.794751585, -0.47753495, 0.374606788),erp/10)
  574. LW.C0=clerp(LW.C0,CFrame.new(-0.896866202, 0.486411452, -0.778488934, 0.92977649, 0.368124545, 0, -0.00642465055, 0.0162268169, -0.99984771, -0.368068486, 0.929634929, 0.0174523834),erp/10)
  575. Handleweld.C1=clerp(Handleweld.C1,Handlecf,erp/10)
  576. rs()
  577. end
  578. wait(.3)
  579. push=false
  580. Arms=true
  581. elseif key=="m" then
  582. if Character.Torso:FindFirstChild("Sound") then
  583. Character.Torso.Sound:Stop()
  584. Character.Torso.Sound:Remove()
  585. else
  586. Sound(songs[k],Character.Torso,1,1)
  587. end
  588. elseif key=="g" then
  589. local hit, pos = workspace:FindPartOnRay(Ray.new(Character.Torso.Position,Vector3.new(0,-1000,0)),Character)
  590. if hit then
  591. idis = (pos-Character.Torso.Position).magnitude
  592. if (pos-Character.Torso.Position).magnitude > 20 then
  593. dis = (pos-Character.Torso.Position).magnitude
  594. Character.Torso.Velocity=Vector3.new(0,-250,0)
  595. Arms=false
  596. Legs=false
  597. for i=1,10 do
  598. LF.C0=clerp(LFC0,CFrame.new(-0.5, 0.200000048, -0.400000006, 1, 0, 0, 0, 1, 0, 0, 0, 1),i/10)
  599. RW.C0=clerp(RWC0,CFrame.new(0.915500879, 0.521719158, -0.684024155, -0.760409832, 0.649443507, 0.000383748062, -0.0201063696, -0.0241324138, 0.999506533, 0.649132311, 0.760026872, 0.0314084738),i/10)
  600. LW.C0=clerp(LWC0,CFrame.new(-0.942085445, 0.456736922, -0.571716368, 0.715692759, -0.697393179, -0.037769489, 0, 0.0540788434, -0.998536646, 0.69841522, 0.714645445, 0.0387038365),i/10)
  601. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(math.rad(20),0,0),i/10)
  602. RF.C0=clerp(RFC0,CFrame.new(0.5, 0.200000048, -0.400000006, 1, 0, 0, 0, 1, 0, 0, 0, 1),i/10)
  603. Handleweld.C1=clerp(Handleweld.C1,Handlecf,i/10)
  604. rs()
  605. end
  606. repeat
  607. dis = (pos-Character.Torso.Position).magnitude
  608. rs()
  609. until dis<=3
  610. Arms=true
  611. Legs=true
  612. local p=Instance.new("Part")
  613. p.Anchored=true
  614. p.CanCollide=false
  615. p.Size=Vector3.new(4,4,4)
  616. p.Transparency=0
  617. local m=Instance.new("SpecialMesh",p)
  618. m.MeshType="FileMesh"
  619. m.Scale=p.Size
  620. m.MeshId="http://www.roblox.com/asset/?id=20329976"
  621. local p2=Instance.new("Part")
  622. p2.Anchored=true
  623. p2.CanCollide=false
  624. p2.Size=Vector3.new(4,4,4)
  625. p2.Transparency=0
  626. local m2=Instance.new("SpecialMesh",p2)
  627. m2.MeshType="FileMesh"
  628. m2.Scale=p2.Size
  629. m2.MeshId="http://www.roblox.com/asset/?id=3270017"
  630. local initpcf = P.Torso.CFrame*CFrame.new(0,-2.5,0)
  631. Sound(696814340,Character.Torso,1,2)
  632. p.Touched:connect(function(op)
  633. if op.Parent.Name~=P.Name then
  634. if op.Parent:FindFirstChild("Humanoid") then
  635. op.Parent.Humanoid:TakeDamage(5)
  636. end
  637. end
  638. end)
  639. spawn(function()
  640. repeat
  641. p.Size=p.Size+Vector3.new(0.5,0.5,0.5)
  642. p.CFrame=initpcf
  643. p.Parent=workspace
  644. p.Transparency=p.Transparency+5/idis
  645. m.Scale=p.Size
  646. p2.Size=p2.Size+Vector3.new(0.5,0.5,0)
  647. p2.CFrame=p.CFrame*CFrame.Angles(math.rad(90),0,0)
  648. p2.Parent=workspace
  649. p2.Transparency=p2.Transparency+5/idis
  650. m2.Scale=p2.Size
  651. wait()
  652. until p.Transparency>=1
  653. p:Remove()
  654. p2:Remove()
  655. end)
  656. end
  657. end
  658. elseif key=="e" then
  659. Arms=false
  660. Legs=false
  661. for i = 1,10 do
  662. rs()
  663. RW.C0=clerp(RWC0,CFrame.new(1.5, 0.5, 0, 0.98419559, 0, 0.177084729, -0.12521781, 0.707106709, 0.695931375, -0.125217795, -0.707106769, 0.695931315),i/10)
  664. LW.C0=clerp(LWC0,CFrame.new(-0.387910306, 0.400549024, -0.802101016, 0.642787635, -0.766044438, 0, 0.627506793, 0.526540756, -0.57357657, 0.439385146, 0.368687928, 0.819151938),i/10)
  665. RF.C0=clerp(RFC0,CFrame.new(0.5, -1.00000024, -0.600000006, 1, 0, 0, 0, 0.993571818, 0.113203347, 0, -0.113203347, 0.993571818),i/10)
  666. LF.C0=clerp(LFC0,CFrame.new(-0.5, -0.938060188, -0.091341728, 1, 0, 0, 0, 0.923879504, 0.382683456, 0, -0.382683456, 0.923879504),i/10)
  667. RootJoint.C0=clerp(TC0,TC0*CFrame.new(0,0,-0.5),i/10)
  668. Handleweld.C1=clerp(Handleweld.C1*CFrame.Angles(-math.rad(30),0,0),Handlecf,.3)
  669. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),i/10)
  670. end
  671. wait(.5)
  672. local p=Instance.new("Part")
  673. p.Anchored=true
  674. p.CanCollide=false
  675. p.Size=Vector3.new(4,4,4)
  676. p.Transparency=0
  677. local m=Instance.new("SpecialMesh",p)
  678. m.MeshType="FileMesh"
  679. m.Scale=p.Size
  680. m.MeshId="http://www.roblox.com/asset/?id=20329976"
  681. local initpcf = P.Torso.CFrame*CFrame.Angles(math.rad(90),0,0)
  682. Sound(696814340,Character.Torso,1,1)
  683. spawn(function()
  684. repeat
  685. p.Size=p.Size+Vector3.new(0.5,0.5,0.5)
  686. p.CFrame=initpcf
  687. p.Parent=workspace
  688. p.Transparency=p.Transparency+0.05
  689. m.Scale=p.Size
  690. wait()
  691. until p.Transparency>=1
  692. p:Remove()
  693. end)
  694. local init = Character.Torso.CFrame
  695. Character.Torso.Velocity=Character.HumanoidRootPart.CFrame.lookVector*250
  696. Arms=true
  697. Legs=true
  698. elseif key=="q" then
  699. Arms=false
  700. Legs=false
  701. for i = 1,10 do
  702. rs()
  703. RW.C0=clerp(RWC0,CFrame.new(1.5, 0.5, 0, 0.901832521, -0.432085752, 0, 0.432085752, 0.901832521, 0, 0, 0, 1),i/10)
  704. LW.C0=clerp(LWC0,CFrame.new(-1.5, 0.5, 0, 0.921185374, 0.389123946, 0, -0.389123946, 0.921185374, 0, 0, 0, 1),i/10)
  705. RF.C0=clerp(RFC0,CFrame.new(0.5, -1.000000024, -0.600000006, 1, 0, 0, 0, 0.993571818, 0.113203347, 0, -0.113203347, 0.993571818),i/10)
  706. LF.C0=clerp(LFC0,CFrame.new(-0.5, -0.938060188, -0.091341728, 1, 0, 0, 0, 0.923879504, 0.382683456, 0, -0.382683456, 0.923879504),i/10)
  707. RootJoint.C0=clerp(TC0,TC0*CFrame.new(0,0,-0.5),i/10)
  708. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(math.rad(20),0,0),i/10)
  709. end
  710. wait(.5)
  711. local p=Instance.new("Part")
  712. p.Anchored=true
  713. p.CanCollide=false
  714. p.Size=Vector3.new(4,4,4)
  715. p.Transparency=0
  716. local m=Instance.new("SpecialMesh",p)
  717. m.MeshType="FileMesh"
  718. m.Scale=p.Size
  719. m.MeshId="http://www.roblox.com/asset/?id=20329976"
  720. local initpcf = P.Torso.CFrame*CFrame.new(0,-2.5,0)
  721. Sound(696796878,Character.Torso,1,1)
  722. spawn(function()
  723. repeat
  724. p.Size=p.Size+Vector3.new(0.5,0.5,0.5)
  725. p.CFrame=initpcf
  726. p.Parent=workspace
  727. p.Transparency=p.Transparency+0.05
  728. m.Scale=p.Size
  729. wait()
  730. until p.Transparency>=1
  731. p:Remove()
  732. end)
  733. local init = Character.Torso.CFrame
  734. Character.Humanoid.Jump=true
  735. Character.Torso.Velocity=Vector3.new(0,250,0)
  736. Arms=true
  737. Legs=true
  738. elseif key=="r" then
  739. if Character.Humanoid.Health>=Character.Humanoid.MaxHealth/2 then
  740. local hint = Instance.new("Part")
  741. hint.Shape="Cylinder"
  742. Sound(334702864,hint,1,1)
  743. hint.Anchored=true
  744. hint.CanCollide=false
  745. hint.Material="Neon"
  746. hint.Transparency=1
  747. hint.BrickColor=BrickColor.new("Toothpaste")
  748. hint.Size=Vector3.new(.2,4,4)
  749. hint.CFrame=CFrame.new(Mouse.Hit.p)*CFrame.Angles(0,0,math.rad(90))
  750. hint.Parent=workspace
  751. for i = 1,30 do
  752. rs()
  753. hint.Transparency=1-i/30
  754. end
  755. Handleweld.Parent=nil
  756. Upweld.Parent=nil
  757. Downweld.Parent=nil
  758. Gripweld.Parent=nil
  759. Connectorweld.Parent=nil
  760. Handle:BreakJoints()
  761. local spear = Handle:Clone()
  762. Upweld.Parent=Handle
  763. Downweld.Parent=Handle
  764. Gripweld.Parent=Handle
  765. Connectorweld.Parent=Handle
  766. Handleweld.Parent=Handle
  767. spear:BreakJoints()
  768. spear.Anchored=true
  769. Connector:Clone().Parent=spear
  770. Up:Clone().Parent=spear
  771. Down:Clone().Parent=spear
  772. Grip:Clone().Parent=spear
  773. for i,v in pairs(spear:children'') do if v:IsA("BasePart") then v.Anchored=true else v:Remove() end end
  774. local parts = {spear.Connector,spear.Up,spear.Down,spear.Grip}
  775. 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)}
  776. spear.CFrame=CFrame.new((hint.CFrame*CFrame.new(-5,0,0)).p)
  777. spear.Parent=workspace
  778. Sound(696796381,spear,1,1)
  779. spear.Touched:connect(function(v)
  780. if v.Parent~=nil then
  781. if v.Parent:FindFirstChild("Humanoid") and v.Parent~=Character then
  782. v.Parent.Humanoid.Health=v.Parent.Humanoid.Health-10
  783. end
  784. end
  785. end)
  786. for _,v in pairs(parts) do
  787. v.CFrame=spear.CFrame*cframes[_]:inverse()
  788. end
  789. for i = 1,10 do
  790. rs()
  791. spear.CFrame=spear.CFrame*CFrame.new(0,0.7,0)
  792. for _,v in pairs(parts) do
  793. v.CFrame=spear.CFrame*cframes[_]:inverse()
  794. end
  795. end
  796. spawn(function()
  797. wait(.5)
  798. spear:Destroy()
  799. Handleweld = Instance.new("ManualWeld")
  800. Handleweld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  801. Handleweld.Part1 = Character.Handle Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  802. Handleweld.C1 = CFrame.new(-0.0500130653, -0.15998745, 0.999988556, 1, 0, 0, 0, 0, -1, 0, 0.999999881, 0)
  803. Handleweld.Parent = game.Players.LocalPlayer.Character["Right Arm"]
  804. hint:Remove()
  805. end)
  806. else
  807. for offset = 1, 5 do
  808. spawn(function()
  809. local multiplier = neg[math.random(1,2)]
  810. local multi = neg[math.random(1,2)]
  811. local hint = Instance.new("Part")
  812. hint.Shape="Cylinder"
  813. Sound(334702864,hint,1,1)
  814. hint.Anchored=true
  815. hint.CanCollide=false
  816. hint.Material="Neon"
  817. hint.Transparency=1
  818. hint.BrickColor=BrickColor.new("Toothpaste")
  819. hint.Size=Vector3.new(.2,4,4)
  820. if offset==1 then
  821. hint.CFrame=CFrame.new(Mouse.Hit.p)*CFrame.Angles(0,0,math.rad(90))
  822. else
  823. hint.CFrame=CFrame.new(Mouse.Hit.p+Vector3.new(math.random(1,10)*multi,0,math.random(1,10)*multiplier))*CFrame.Angles(0,0,math.rad(90))
  824. end
  825. hint.Parent=workspace
  826. for i = 1,30 do
  827. rs()
  828. hint.Transparency=1-i/30
  829. end
  830. Handleweld.Parent=nil
  831. Upweld.Parent=nil
  832. Downweld.Parent=nil
  833. Gripweld.Parent=nil
  834. Connectorweld.Parent=nil
  835. Handle:BreakJoints()
  836. local spear = Handle:Clone()
  837. Upweld.Parent=Handle
  838. Downweld.Parent=Handle
  839. Gripweld.Parent=Handle
  840. Connectorweld.Parent=Handle
  841. Handleweld.Parent=Handle
  842. spear:BreakJoints()
  843. spear.Anchored=true
  844. Connector:Clone().Parent=spear
  845. Up:Clone().Parent=spear
  846. Down:Clone().Parent=spear
  847. Grip:Clone().Parent=spear
  848. for i,v in pairs(spear:children'') do if v:IsA("BasePart") then v.Anchored=true else v:Remove() end end
  849. local parts = {spear.Connector,spear.Up,spear.Down,spear.Grip}
  850. 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)}
  851. spear.CFrame=CFrame.new((hint.CFrame*CFrame.new(-5,0,0)).p)
  852. spear.Parent=workspace
  853. Sound(696796381,spear,1,1)
  854. spear.Touched:connect(function(v)
  855. if v.Parent~=nil then
  856. if v.Parent:FindFirstChild("Humanoid") and v.Parent~=Character then
  857. v.Parent.Humanoid.Health=v.Parent.Humanoid.Health-10
  858. end
  859. end
  860. end)
  861. for _,v in pairs(parts) do
  862. v.CFrame=spear.CFrame*cframes[_]:inverse()
  863. end
  864. for i = 1,10 do
  865. rs()
  866. spear.CFrame=spear.CFrame*CFrame.new(0,0.7,0)
  867. for _,v in pairs(parts) do
  868. v.CFrame=spear.CFrame*cframes[_]:inverse()
  869. end
  870. end
  871. spawn(function()
  872. wait(.5)
  873. spear:Destroy()
  874. Handleweld = Instance.new("ManualWeld")
  875. Handleweld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  876. Handleweld.Part1 = Character.Handle Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  877. Handleweld.C1 = CFrame.new(-0.0500130653, -0.15998745, 0.999988556, 1, 0, 0, 0, 0, -1, 0, 0.999999881, 0)
  878. Handleweld.Parent = game.Players.LocalPlayer.Character["Right Arm"]
  879. hint:Remove()
  880. end)
  881. end)
  882. end
  883. end
  884. end
  885. end)
  886.  
  887. local enabled=true
  888. Mouse.KeyUp:connect(function(key)
  889. if key=="f" and enabled then
  890. aiming=false
  891. enabled=false
  892. if #spears==0 then
  893. Handleweld:Destroy()
  894. local temp = Handle
  895. temp.Parent=workspace
  896. temp.CanCollide=true
  897. local parts = {Connector,Up,Down,Grip}
  898. local cframes = {Connectorweld.C1,Upweld.C1,Downweld.C1,Gripweld.C1}
  899. local init = Mouse.Hit.p
  900. local dir = init - temp.Position
  901. for i,v in pairs(parts) do v.Anchored=true end Handle.Anchored=true
  902. spawn(function()
  903. for i = 1,200 do
  904. rs()
  905. for _,v in pairs(temp:GetTouchingParts()) do
  906. if v.Parent~=nil then
  907. if v.Parent:FindFirstChild("Humanoid") and v.Parent~=Character then
  908. v.Parent.Humanoid.Health=v.Parent.Humanoid.Health-5
  909. end
  910. end
  911. end
  912. local Distance = (init-temp.Position).magnitude
  913. if Distance > 2 then Distance = 2 end
  914. temp.CFrame = CFrame.new(temp.Position,init) * CFrame.new(0,0,-Distance) * CFrame.Angles(math.rad(-90),math.rad(90),0)
  915. for _,v in pairs(parts) do
  916. v.CFrame=temp.CFrame*cframes[_]:inverse()
  917. end
  918. end
  919. temp:Remove()
  920. for i,v in pairs(parts) do v:Remove() end
  921. end)
  922. Handle = Instance.new("Part", game.Players.LocalPlayer.Character)
  923. Handle:BreakJoints()
  924. Handle.TopSurface = "Smooth"
  925. Handle.Material = "SmoothPlastic"
  926. Handle.Name = 'Handle'
  927. Handle.Transparency=1
  928. Handle.BottomSurface = "Smooth"
  929. Handle.FormFactor = "Custom" Handle.CanCollide = false
  930. Handle.BrickColor = BrickColor.new("Medium stone grey")
  931. Handle.Size = Vector3.new(0.5, 4.9000001, 0.799999833)
  932. Handleweld = Instance.new("ManualWeld")
  933. Handleweld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  934. Handleweld.Part1 = Handle Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  935. Handleweld.C1 = CFrame.new(-0.0500130653, -0.15998745, 0.999988556, 1, 0, 0, 0, 0, -1, 0, 0.999999881, 0)
  936. Handleweld.Parent = game.Players.LocalPlayer.Character["Right Arm"]
  937. staffweld=Handleweld
  938. Handlecf=Handleweld.C1
  939. Grip = Instance.new("Part", game.Players.LocalPlayer.Character)
  940. Grip:BreakJoints()
  941. Grip.TopSurface = "Smooth"
  942. Grip.Material = "SmoothPlastic"
  943. Grip.Name = 'Grip'
  944. Grip.BottomSurface = "Smooth"
  945. Grip.FormFactor = "Custom" Grip.CanCollide = false
  946. Grip.BrickColor = BrickColor.new("Toothpaste")
  947. Grip.Size = Vector3.new(0.400000006, 4, 0.400000006)
  948. Gripweld = Instance.new("ManualWeld")
  949. Gripweld.Part0 = Handle Gripweld.Part1 = Grip Gripweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  950. Gripweld.C1 = CFrame.new(0.0500068665, 0.449998379, 5.96046448e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  951. Gripweld.Parent = Grip
  952. GripMesh = Instance.new("CylinderMesh",Grip)
  953. GripMesh.Name = "Mesh"
  954. GripMesh.Offset = Vector3.new(0, 0, 0)
  955. GripMesh.Scale = Vector3.new(1, 1, 1)
  956.  
  957. Down = Instance.new("WedgePart", game.Players.LocalPlayer.Character)
  958. Down:BreakJoints()
  959. Down.TopSurface = "Smooth"
  960. Down.Material = "SmoothPlastic"
  961. Down.Name = 'Down'
  962. Down.BottomSurface = "Smooth"
  963. Down.FormFactor = "Custom" Down.CanCollide = false
  964. Down.BrickColor = BrickColor.new("Toothpaste")
  965. Down.Size = Vector3.new(0.200000003, 1, 0.400000006)
  966. Downweld = Instance.new("ManualWeld")
  967. Downweld.Part0 = Handle Downweld.Part1 = Down Downweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  968. Downweld.C1 = CFrame.new(0.0500155687, -1.95003223, 0.19999814, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  969. Downweld.Parent = Down
  970. Connector = Instance.new("Part", game.Players.LocalPlayer.Character)
  971. Connector:BreakJoints()
  972. Connector.TopSurface = "Smooth"
  973. Connector.Material = "SmoothPlastic"
  974. Connector.Name = 'Connector'
  975. Connector.Shape="Ball"
  976. Connector.BottomSurface = "Smooth"
  977. Connector.FormFactor = "Custom" Connector.CanCollide = false
  978. Connector.BrickColor = BrickColor.new("Toothpaste")
  979. Connector.Size = Vector3.new(0.400000006, 0.400000006, 0.400000006)
  980. Connectorweld = Instance.new("ManualWeld")
  981. Connectorweld.Part0 = Handle Connectorweld.Part1 = Connector Connectorweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  982. Connectorweld.C1 = CFrame.new(0.0500068665, -1.55001354, 6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  983. Connectorweld.Parent = Connector
  984. Up = Instance.new("WedgePart", game.Players.LocalPlayer.Character)
  985. Up:BreakJoints()
  986. Up.TopSurface = "Smooth"
  987. Up.Material = "SmoothPlastic"
  988. Up.Name = 'Up'
  989. Up.BottomSurface = "Smooth"
  990. Up.FormFactor = "Custom" Up.CanCollide = false
  991. Up.BrickColor = BrickColor.new("Toothpaste")
  992. Up.Size = Vector3.new(0.200000003, 1, 0.400000006)
  993. Upweld = Instance.new("ManualWeld")
  994. Upweld.Part0 = Handle Upweld.Part1 = Up Upweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  995. Upweld.C1 = CFrame.new(-0.0500155687, -1.95002747, 0.200003147, -1, 0, 0, 0, 1, 0, -0, 0, -1)
  996. Upweld.Parent = Up
  997. Connector.Material="Neon"
  998. Grip.Material="Neon"
  999. Up.Material="Neon"
  1000. Down.Material="Neon"
  1001. Handle.Archivable=true
  1002. else
  1003. local init = Mouse.Hit.p
  1004. for derp,rekt in pairs(spears) do
  1005. spawn(function()
  1006. local asd = rekt
  1007. asd:BreakJoints()
  1008. asd.Parent = workspace
  1009. asd.CanCollide = true
  1010. local parts = {asd.Connector,asd.Up,asd.Down,asd.Grip}
  1011. local cframes = {Connectorweld.C1,Upweld.C1,Downweld.C1,Gripweld.C1}
  1012. for i,v in pairs(parts) do v.Anchored=true end asd.Anchored=true
  1013. for i = 1,200 do
  1014. rs()
  1015. for _,v in pairs(asd:GetTouchingParts()) do
  1016. if v.Parent~=nil then
  1017. if v.Parent:FindFirstChild("Humanoid") and v.Parent~=Character then
  1018. v.Parent.Humanoid.Health=v.Parent.Humanoid.Health-5
  1019. end
  1020. end
  1021. end
  1022. local Distance = (init-asd.Position).magnitude
  1023. if Distance > 2 then Distance = 2 end
  1024. asd.CFrame = CFrame.new(asd.Position,init) * CFrame.new(0,0,-Distance) * CFrame.Angles(math.rad(-90),math.rad(90),0)
  1025. for _,v in pairs(parts) do
  1026. v.CFrame=asd.CFrame*cframes[_]:inverse()
  1027. end
  1028. end
  1029. asd:Remove()
  1030. for i,v in pairs(parts) do v:Remove() end
  1031. end)
  1032. end
  1033. spears = {}
  1034. end
  1035. Sound(696796381,Handle,1,1)
  1036. for i = 1,10 do
  1037. rs()
  1038. 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)
  1039. 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)
  1040. end
  1041. enabled=true
  1042. Arms=true
  1043. end
  1044. end)
Add Comment
Please, Sign In to add comment