Advertisement
lafur

Untitled

Aug 31st, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.74 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. 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(),Button2Up=c(),Button2Down=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;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")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 typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u 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 rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},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")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end --This is a rare nobody really even has, it's pretty cool -Chromium/Milky
  6.  
  7. Player=game:GetService("Players").LocalPlayer
  8. Character=Player.Character
  9. PlayerGui=Player.PlayerGui
  10. Backpack=Player.Backpack
  11. Torso=Character.Torso
  12. Head=Character.Head
  13. Humanoid=Character.Humanoid
  14. m=Instance.new('Model',Character)
  15. LeftArm=Character["Left Arm"]
  16. LeftLeg=Character["Left Leg"]
  17. RightArm=Character["Right Arm"]
  18. RightLeg=Character["Right Leg"]
  19. LS=Torso["Left Shoulder"]
  20. LH=Torso["Left Hip"]
  21. RS=Torso["Right Shoulder"]
  22. RH=Torso["Right Hip"]
  23. Face = Head.face
  24. Neck=Torso.Neck
  25. it=Instance.new
  26. attacktype=1
  27. vt=Vector3.new
  28. cf=CFrame.new
  29. euler=CFrame.fromEulerAnglesXYZ
  30. angles=CFrame.Angles
  31. cloaked=false
  32. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  33. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  34. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  35. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  36. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  37. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  38. RootPart=Character.HumanoidRootPart
  39. RootJoint=RootPart.RootJoint
  40. RootCF=euler(-1.57,0,3.14)
  41. attack = false
  42. attackdebounce = false
  43. deb=false
  44. equipped=true
  45. hand=false
  46. MMouse=nil
  47. combo=0
  48. mana=0
  49. trispeed=.2
  50. attackmode='none'
  51. local idle=0
  52. local Anim="Idle"
  53. local Effects={}
  54. local gun=false
  55. local shoot=false
  56. player=nil
  57. mana=0
  58.  
  59. mouse=Player:GetMouse()
  60. --save shoulders
  61. RSH, LSH=nil, nil
  62. --welds
  63. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  64. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  65. LH=Torso["Left Hip"]
  66. RH=Torso["Right Hip"]
  67. TorsoColor=Torso.BrickColor
  68. function NoOutline(Part)
  69. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  70. end
  71. player=Player
  72. ch=Character
  73. RSH=ch.Torso["Right Shoulder"]
  74. LSH=ch.Torso["Left Shoulder"]
  75. --
  76. RSH.Parent=nil
  77. LSH.Parent=nil
  78. --
  79. RW.Name="Right Shoulder"
  80. RW.Part0=ch.Torso
  81. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  82. RW.C1=cf(0, 0.5, 0)
  83. RW.Part1=ch["Right Arm"]
  84. RW.Parent=ch.Torso
  85. --
  86. LW.Name="Left Shoulder"
  87. LW.Part0=ch.Torso
  88. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  89. LW.C1=cf(0, 0.5, 0)
  90. LW.Part1=ch["Left Arm"]
  91. LW.Parent=ch.Torso
  92.  
  93. Player=game:GetService('Players').LocalPlayer
  94. Character=Player.Character
  95. Mouse=Player:GetMouse()
  96. m=Instance.new('Model',Character)
  97.  
  98.  
  99. local function weldBetween(a, b)
  100. local weldd = Instance.new("ManualWeld")
  101. weldd.Part0 = a
  102. weldd.Part1 = b
  103. weldd.C0 = CFrame.new()
  104. weldd.C1 = b.CFrame:inverse() * a.CFrame
  105. weldd.Parent = a
  106. return weldd
  107. end
  108.  
  109. function swait(num)
  110. if num==0 or num==nil then
  111. game:service'RunService'.Heartbeat:wait(0)
  112. else
  113. for i=0,num do
  114. game:service'RunService'.Heartbeat:wait(0)
  115. end
  116. end
  117. end
  118.  
  119. function nooutline(part)
  120. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  121. end
  122.  
  123. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  124. local fp=it("Part")
  125. fp.formFactor=formfactor
  126. fp.Parent=parent
  127. fp.Reflectance=reflectance
  128. fp.Transparency=transparency
  129. fp.CanCollide=false
  130. fp.Locked=true
  131. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  132. fp.Name=name
  133. fp.Size=size
  134. fp.Position=Character.Torso.Position
  135. nooutline(fp)
  136. fp.Material=material
  137. fp:BreakJoints()
  138. return fp
  139. end
  140.  
  141. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  142. local mesh=it(Mesh)
  143. mesh.Parent=part
  144. if Mesh=="SpecialMesh" then
  145. mesh.MeshType=meshtype
  146. mesh.MeshId=meshid
  147. end
  148. mesh.Offset=offset
  149. mesh.Scale=scale
  150. return mesh
  151. end
  152.  
  153. function weld(parent,part0,part1,c0,c1)
  154. local weld=it("Weld")
  155. weld.Parent=parent
  156. weld.Part0=part0
  157. weld.Part1=part1
  158. weld.C0=c0
  159. weld.C1=c1
  160. return weld
  161. end
  162.  
  163.  
  164. local function CFrameFromTopBack(at, top, back)
  165. local right = top:Cross(back)
  166. return CFrame.new(at.x, at.y, at.z,
  167. right.x, top.x, back.x,
  168. right.y, top.y, back.y,
  169. right.z, top.z, back.z)
  170. end
  171.  
  172. function Triangle(a, b, c)
  173. local edg1 = (c-a):Dot((b-a).unit)
  174. local edg2 = (a-b):Dot((c-b).unit)
  175. local edg3 = (b-c):Dot((a-c).unit)
  176. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  177. a, b, c = a, b, c
  178. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  179. a, b, c = b, c, a
  180. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  181. a, b, c = c, a, b
  182. else
  183. assert(false, "unreachable")
  184. end
  185.  
  186. local len1 = (c-a):Dot((b-a).unit)
  187. local len2 = (b-a).magnitude - len1
  188. local width = (a + (b-a).unit*len1 - c).magnitude
  189.  
  190. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  191.  
  192. local list = {}
  193.  
  194. local TrailColor = ("Institutional white")
  195.  
  196. if len1 > 0.01 then
  197. local w1 = Instance.new('WedgePart', m)
  198. game:GetService("Debris"):AddItem(w1,5)
  199. w1.Material = "DiamondPlate"
  200. w1.FormFactor = 'Custom'
  201. w1.BrickColor = BrickColor.new(TrailColor)
  202. w1.Transparency = 0
  203. w1.Reflectance = 0
  204. w1.Material = "DiamondPlate"
  205. w1.CanCollide = false
  206. NoOutline(w1)
  207. local sz = Vector3.new(0.2, width, len1)
  208. w1.Size = sz
  209. local sp = Instance.new("SpecialMesh",w1)
  210. sp.MeshType = "Wedge"
  211. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  212. w1:BreakJoints()
  213. w1.Anchored = true
  214. w1.Parent = workspace
  215. w1.Transparency = 0.7
  216. table.insert(Effects,{w1,"Disappear",.01})
  217. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  218. table.insert(list,w1)
  219. end
  220.  
  221. if len2 > 0.01 then
  222. local w2 = Instance.new('WedgePart', m)
  223. game:GetService("Debris"):AddItem(w2,5)
  224. w2.Material = "DiamondPlate"
  225. w2.FormFactor = 'Custom'
  226. w2.BrickColor = BrickColor.new(TrailColor)
  227. w2.Transparency = 0
  228. w2.Reflectance = 0
  229. w2.Material = "DiamondPlate"
  230. w2.CanCollide = false
  231. NoOutline(w2)
  232. local sz = Vector3.new(0.2, width, len2)
  233. w2.Size = sz
  234. local sp = Instance.new("SpecialMesh",w2)
  235. sp.MeshType = "Wedge"
  236. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  237. w2:BreakJoints()
  238. w2.Anchored = true
  239. w2.Parent = workspace
  240. w2.Transparency = 0.7
  241. table.insert(Effects,{w2,"Disappear",.01})
  242. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  243. table.insert(list,w2)
  244. end
  245. return unpack(list)
  246. end
  247.  
  248.  
  249. so = function(id,par,vol,pit)
  250. coroutine.resume(coroutine.create(function()
  251. local sou = Instance.new("Sound",par or workspace)
  252. sou.Volume=vol
  253. sou.Pitch=pit or 1
  254. sou.SoundId=id
  255. swait()
  256. sou:play()
  257. game:GetService("Debris"):AddItem(sou,6)
  258. end))
  259. end
  260.  
  261. function clerp(a,b,t)
  262. local qa = {QuaternionFromCFrame(a)}
  263. local qb = {QuaternionFromCFrame(b)}
  264. local ax, ay, az = a.x, a.y, a.z
  265. local bx, by, bz = b.x, b.y, b.z
  266. local _t = 1-t
  267. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  268. end
  269.  
  270. function QuaternionFromCFrame(cf)
  271. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  272. local trace = m00 + m11 + m22
  273. if trace > 0 then
  274. local s = math.sqrt(1 + trace)
  275. local recip = 0.5/s
  276. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  277. else
  278. local i = 0
  279. if m11 > m00 then
  280. i = 1
  281. end
  282. if m22 > (i == 0 and m00 or m11) then
  283. i = 2
  284. end
  285. if i == 0 then
  286. local s = math.sqrt(m00-m11-m22+1)
  287. local recip = 0.5/s
  288. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  289. elseif i == 1 then
  290. local s = math.sqrt(m11-m22-m00+1)
  291. local recip = 0.5/s
  292. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  293. elseif i == 2 then
  294. local s = math.sqrt(m22-m00-m11+1)
  295. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  296. end
  297. end
  298. end
  299.  
  300. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  301. local xs, ys, zs = x + x, y + y, z + z
  302. local wx, wy, wz = w*xs, w*ys, w*zs
  303. local xx = x*xs
  304. local xy = x*ys
  305. local xz = x*zs
  306. local yy = y*ys
  307. local yz = y*zs
  308. local zz = z*zs
  309. 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))
  310. end
  311.  
  312. function QuaternionSlerp(a, b, t)
  313. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  314. local startInterp, finishInterp;
  315. if cosTheta >= 0.0001 then
  316. if (1 - cosTheta) > 0.0001 then
  317. local theta = math.acos(cosTheta)
  318. local invSinTheta = 1/math.sin(theta)
  319. startInterp = math.sin((1-t)*theta)*invSinTheta
  320. finishInterp = math.sin(t*theta)*invSinTheta
  321. else
  322. startInterp = 1-t
  323. finishInterp = t
  324. end
  325. else
  326. if (1+cosTheta) > 0.0001 then
  327. local theta = math.acos(-cosTheta)
  328. local invSinTheta = 1/math.sin(theta)
  329. startInterp = math.sin((t-1)*theta)*invSinTheta
  330. finishInterp = math.sin(t*theta)*invSinTheta
  331. else
  332. startInterp = t-1
  333. finishInterp = t
  334. end
  335. end
  336. 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
  337. end
  338.  
  339. --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  340.  
  341.  
  342. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  343. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  344. end
  345.  
  346. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  347. if hit.Parent==nil then
  348. return
  349. end
  350. h=hit.Parent:FindFirstChild("Humanoid")
  351. for _,v in pairs(hit.Parent:children()) do
  352. if v:IsA("Humanoid") then
  353. h=v
  354. end
  355. end
  356. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  357. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  358. end
  359. if hit.Parent.className=="Hat" then
  360. hit=hit.Parent.Parent:findFirstChild("Head")
  361. end
  362. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  363. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  364. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  365. return
  366. end]]
  367. -- hs(hit,1.2)
  368. c=Instance.new("ObjectValue")
  369. c.Name="creator"
  370. c.Value=game:service("Players").LocalPlayer
  371. c.Parent=h
  372. game:GetService("Debris"):AddItem(c,.5)
  373. Damage=math.random(minim,maxim)
  374. -- h:TakeDamage(Damage)
  375. blocked=false
  376. block=hit.Parent:findFirstChild("Block")
  377. if block~=nil then
  378. print(block.className)
  379. if block.className=="NumberValue" then
  380. if block.Value>0 then
  381. blocked=true
  382. if decreaseblock==nil then
  383. block.Value=block.Value-1
  384. end
  385. end
  386. end
  387. if block.className=="IntValue" then
  388. if block.Value>0 then
  389. blocked=true
  390. if decreaseblock~=nil then
  391. block.Value=block.Value-1
  392. end
  393. end
  394. end
  395. end
  396. if blocked==false then
  397. -- h:TakeDamage(Damage)
  398. h.Health=h.Health-Damage
  399. showDamage(hit.Parent,Damage,.5,BrickColor.new("Institutional white"))
  400. else
  401. h.Health=h.Health-(Damage/2)
  402. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  403. end
  404. if Type=="Knockdown" then
  405. hum=hit.Parent.Humanoid
  406. hum.PlatformStand=true
  407. coroutine.resume(coroutine.create(function(HHumanoid)
  408. swait(1)
  409. HHumanoid.PlatformStand=false
  410. end),hum)
  411. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  412. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  413. local bodvol=Instance.new("BodyVelocity")
  414. bodvol.velocity=angle*knockback
  415. bodvol.P=5000
  416. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  417. bodvol.Parent=hit
  418. rl=Instance.new("BodyAngularVelocity")
  419. rl.P=3000
  420. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  421. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  422. rl.Parent=hit
  423. game:GetService("Debris"):AddItem(bodvol,.5)
  424. game:GetService("Debris"):AddItem(rl,.5)
  425. elseif Type=="Normal" then
  426. vp=Instance.new("BodyVelocity")
  427. vp.P=500
  428. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  429. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  430. if KnockbackType==1 then
  431. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  432. elseif KnockbackType==2 then
  433. vp.velocity=Property.CFrame.lookVector*knockback
  434. end
  435. if knockback>0 then
  436. vp.Parent=hit.Parent.Torso
  437. end
  438. game:GetService("Debris"):AddItem(vp,.5)
  439. elseif Type=="Up" then
  440. local bodyVelocity=Instance.new("BodyVelocity")
  441. bodyVelocity.velocity=vt(0,60,0)
  442. bodyVelocity.P=5000
  443. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  444. bodyVelocity.Parent=hit
  445. game:GetService("Debris"):AddItem(bodyVelocity,1)
  446. rl=Instance.new("BodyAngularVelocity")
  447. rl.P=3000
  448. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  449. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  450. rl.Parent=hit
  451. game:GetService("Debris"):AddItem(rl,.5)
  452. elseif Type=="Snare" then
  453. bp=Instance.new("BodyPosition")
  454. bp.P=2000
  455. bp.D=100
  456. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  457. bp.position=hit.Parent.Torso.Position
  458. bp.Parent=hit.Parent.Torso
  459. game:GetService("Debris"):AddItem(bp,1)
  460. elseif Type=="Target" then
  461. if Targetting==false then
  462. ZTarget=hit.Parent.Torso
  463. coroutine.resume(coroutine.create(function(Part)
  464. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  465. swait(5)
  466. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  467. end),ZTarget)
  468. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  469. targetgui=Instance.new("BillboardGui")
  470. targetgui.Parent=ZTarget
  471. targetgui.Size=UDim2.new(10,100,10,100)
  472. targ=Instance.new("ImageLabel")
  473. targ.Parent=targetgui
  474. targ.BackgroundTransparency=1
  475. targ.Image="rbxassetid://4834067"
  476. targ.Size=UDim2.new(1,0,1,0)
  477. cam.CameraType="Scriptable"
  478. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  479. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  480. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  481. Targetting=true
  482. RocketTarget=ZTarget
  483. for i=1,Property do
  484. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  485. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  486. swait()
  487. end
  488. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  489. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  490. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  491. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  492. end
  493. Targetting=false
  494. RocketTarget=nil
  495. targetgui.Parent=nil
  496. cam.CameraType="Custom"
  497. end
  498. end
  499. debounce=Instance.new("BoolValue")
  500. debounce.Name="DebounceHit"
  501. debounce.Parent=hit.Parent
  502. debounce.Value=true
  503. game:GetService("Debris"):AddItem(debounce,Delay)
  504. c=Instance.new("ObjectValue")
  505. c.Name="creator"
  506. c.Value=Player
  507. c.Parent=h
  508. game:GetService("Debris"):AddItem(c,.5)
  509. CRIT=false
  510. hitDeb=true
  511. AttackPos=6
  512. end
  513. end
  514.  
  515. showDamage=function(Char,Dealt,du,Color)
  516. m=Instance.new("Model")
  517. m.Name=tostring(Dealt)
  518. h=Instance.new("Humanoid")
  519. h.Health=0
  520. h.MaxHealth=0
  521. h.Parent=m
  522. c=Instance.new("Part")
  523. c.Transparency=0
  524. c.BrickColor=Color
  525. c.Name="Head"
  526. c.TopSurface=0
  527. c.BottomSurface=0
  528. c.formFactor="Plate"
  529. c.Size=Vector3.new(1,.4,1)
  530. ms=Instance.new("CylinderMesh")
  531. ms.Scale=Vector3.new(.8,.8,.8)
  532. if CRIT==true then
  533. ms.Scale=Vector3.new(1,1.25,1)
  534. end
  535. ms.Parent=c
  536. c.Reflectance=0
  537. Instance.new("BodyGyro").Parent=c
  538. c.Parent=m
  539. if Char:findFirstChild("Head")~=nil then
  540. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  541. elseif Char.Parent:findFirstChild("Head")~=nil then
  542. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  543. end
  544. f=Instance.new("BodyPosition")
  545. f.P=2000
  546. f.D=100
  547. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  548. f.position=c.Position+Vector3.new(0,3,0)
  549. f.Parent=c
  550. game:GetService("Debris"):AddItem(m,.5+du)
  551. c.CanCollide=false
  552. m.Parent=workspace
  553. c.CanCollide=false
  554. end
  555.  
  556. handle=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Handle",Vector3.new(1.00000012, 0.200000003, 0.600000024))
  557. handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00497817993, 1.09852839, -0.00498199463, -1.00772247e-025, 2.44568227e-013, 1, 2.26874075e-013, 0.999999881, 2.44568255e-013, -1, -2.26874048e-013, 1.00166402e-025))
  558. Hitbox=part(Enum.FormFactor.Custom,m,Enum.Material.WoodPlanks,0,1,"Dark indigo","Hitbox",Vector3.new(0.400000036, 1.60000014, 0.600000024))
  559. Hitboxweld=weld(m,handle,Hitbox,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699993134, -0.101213217, 0, 1, 2.45206633e-013, 2.23613988e-025, -2.45206633e-013, -1, 2.26374475e-013, -2.25900477e-025, 2.26374475e-013, -1))
  560. mesh("SpecialMesh",Hitbox,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=1778999",Vector3.new(0, 0, 0),Vector3.new(0.300000012, 0.479999989, 0.300000012))
  561. PBNeedle=part(Enum.FormFactor.Custom,m,Enum.Material.WoodPlanks,0,0,"Dark indigo","PBNeedle",Vector3.new(0.400000006, 0.400000006, 0.200000003))
  562. PBNeedleweld=weld(m,handle,PBNeedle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699993134, -0.501211882, 0, 1, 2.45206633e-013, 2.23613988e-025, -2.45206633e-013, -1, 2.26374475e-013, -2.25900477e-025, 2.26374475e-013, -1))
  563. mesh("SpecialMesh",PBNeedle,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=1778999",Vector3.new(0, 0, 0),Vector3.new(0.300000012, 0.479999989, 0.300000012))
  564. PBPart1=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","PBPart1",Vector3.new(0.800000012, 0.399999946, 0.600000024))
  565. PBPart1weld=weld(m,handle,PBPart1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699993134, -3.69963789, -7.15255737e-006, 1, 5.05664954e-013, -1.30451205e-015, 4.97449304e-013, 1, -4.5374815e-013, 1.30451205e-015, -4.5374815e-013, 1))
  566. mesh("CylinderMesh",PBPart1,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  567. PBPart2=part(Enum.FormFactor.Custom,m,Enum.Material.Plastic,0,0,"Institutional white","PBPart2",Vector3.new(0.400000006, 0.600000024, 0.400000006))
  568. PBPart2weld=weld(m,handle,PBPart2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700050354, -7.00950623e-005, 3.49907684, -1, -1.60482286e-005, -1.59286301e-007, 1.58860502e-007, 2.65327035e-005, -1, 1.60482323e-005, -1, -2.65327017e-005))
  569. mesh("SpecialMesh",PBPart2,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=18430887",Vector3.new(0, 0, 0),Vector3.new(0.299999982, 0.299999982, 2.22000003))
  570. PBPole=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Dark indigo","PBPole",Vector3.new(0.400000006, 3.5999999, 0.600000024))
  571. PBPoleweld=weld(m,handle,PBPole,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699993134, -1.69878912, 0, 1, 2.91981717e-013, 2.13405832e-025, 2.91981717e-013, 1, -2.97428748e-013, 2.22223004e-025, -2.40585329e-013, 1))
  572. mesh("CylinderMesh",PBPole,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  573. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 2, 0.600000024))
  574. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998474, -1.09998429, 0, 1, 2.45206633e-013, 2.23613988e-025, 2.45205765e-013, 0.999996424, -2.26373662e-013, 2.25900477e-025, -2.26374475e-013, 1))
  575. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.400000006, 0.600000024))
  576. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.325069427, -0.366897583, 0, 0.707222462, -0.706991136, 1.60148153e-013, 0.706991136, 0.707222462, -1.60200642e-013, 2.25900477e-025, -2.26374475e-013, 1))
  577. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Dark indigo","Part",Vector3.new(0.200000003, 2, 0.200000003))
  578. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998474, -1.09959769, -0.40000391, 1, 2.45206633e-013, 2.23613988e-025, 2.45206633e-013, 1, -2.26374475e-013, 2.25900477e-025, -2.26374475e-013, 1))
  579. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.560000002))
  580. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.400000006, 0.600000024, 0.200000003))
  581. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.699993134, 1.09672546e-005, 0.200021386, -0.999997139, -5.88281814e-008, 2.74286049e-005, -2.76967985e-005, -7.53964502e-010, -0.999998033, 5.88349671e-008, -0.999996901, -2.88369467e-011))
  582. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.420000017, 0.460000008, 1))
  583. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  584. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998474, 1.99907148, 0.400010586, 1, -2.3827215e-007, 4.58606735e-007, -2.38272577e-007, -1, -1.63917434e-007, 4.58606763e-007, 1.6391779e-007, -1))
  585. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.819999993, 0.560000002, 1.31999993))
  586. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Dark indigo","Part",Vector3.new(0.200000003, 2, 0.200000003))
  587. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998474, -1.09944224, 0.399987221, 1, 2.45206633e-013, 2.23613988e-025, 2.45206633e-013, 1, -2.26374475e-013, 2.25900477e-025, -2.26374475e-013, 1))
  588. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.560000002))
  589. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  590. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599994659, 1.99895847, -0.399979591, 1, -2.38257996e-007, 4.58606735e-007, -2.38258409e-007, -1, -1.63927155e-007, 4.58606763e-007, 1.63927496e-007, -1))
  591. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.819999993, 0.560000002, 1.31999993))
  592. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  593. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998474, 0.198883891, -0.399979591, 1, -2.38229688e-007, 4.58606735e-007, -2.38230101e-007, -1, -1.63946595e-007, 4.58606763e-007, 1.63946936e-007, -1))
  594. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.819999993, 0.560000002, 1.31999993))
  595. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  596. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998474, 0.198892951, 0.400010586, 1, -2.38208457e-007, 4.58606735e-007, -2.3820887e-007, -1, -1.63961175e-007, 4.58606763e-007, 1.63961516e-007, -1))
  597. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.819999993, 0.560000002, 1.31999993))
  598. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.800000012))
  599. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998474, -0.199686766, 0, 1, 2.49342214e-013, 2.23281582e-025, 2.41071052e-013, 1, -2.26374475e-013, 2.25900477e-025, -2.26374475e-013, 1))
  600. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.5, 1))
  601. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.200000003, 0.800000072))
  602. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.599998474, -1.99940848, 0, 1, 2.49342214e-013, 2.23281582e-025, 2.41071052e-013, 1, -2.26374475e-013, 2.25900477e-025, -2.26374475e-013, 1))
  603. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.5, 1))
  604. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.800000012, 0.799999952, 0.600000024))
  605. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699993134, -1.09965634, -7.15255737e-006, 1, 2.53450039e-013, -1.30451205e-015, 2.36963227e-013, 1, -2.26374475e-013, 1.30451205e-015, -2.26374475e-013, 1))
  606. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  607. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Plastic,0,0,"Institutional white","Part",Vector3.new(0.400000006, 0.200000003, 0.400000006))
  608. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700004578, -2.67028809e-005, 0.699332714, -1, -1.60535947e-005, -1.59286301e-007, 1.58860217e-007, 2.65416365e-005, -1, 1.60535983e-005, -1, -2.65416347e-005))
  609. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=18430887",Vector3.new(0, 0, 0),Vector3.new(0.299999982, 0.299999982, 2.22000003))
  610. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Plastic,0,0,"Institutional white","Part",Vector3.new(0.400000006, 0.200000003, 0.400000006))
  611. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700019836, -1.66893005e-005, 1.49919093, -1, -1.60516884e-005, -1.59286301e-007, 1.58860317e-007, 2.65384861e-005, -1, 1.6051692e-005, -1, -2.65384842e-005))
  612. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=18430887",Vector3.new(0, 0, 0),Vector3.new(0.299999982, 0.299999982, 2.22000003))
  613. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Plastic,0,0,"Dark indigo","Part",Vector3.new(0.400000006, 0.600000024, 0.400000006))
  614. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700023651, -4.29153442e-005, 1.89885879, -1, -1.60487161e-005, -1.59286301e-007, 1.58860473e-007, 2.65335711e-005, -1, 1.60487198e-005, -1, -2.65335693e-005))
  615. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=18430887",Vector3.new(0, 0, 0),Vector3.new(0.299999982, 0.299999982, 2.22000003))
  616. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Dark indigo","Part",Vector3.new(0.600000024, 0.400000006, 0.600000024))
  617. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699993134, -2.09877872, 0, 1, 2.63532252e-013, 2.20870009e-025, 2.26881014e-013, 1, -2.40585329e-013, 2.29174052e-025, -2.1216362e-013, 1))
  618. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  619. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Plastic,0,0,"Dark indigo","Part",Vector3.new(0.400000006, 0.600000024, 0.400000006))
  620. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700031281, -3.81469727e-005, 2.29907608, -1, -1.60496675e-005, -1.59286301e-007, 1.58860416e-007, 2.65351464e-005, -1, 1.60497293e-005, -0.999996424, -2.65352392e-005))
  621. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=18430887",Vector3.new(0, 0, 0),Vector3.new(0.299999982, 0.299999982, 2.22000003))
  622. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036))
  623. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.900005341, -2.09888887, 0.0100111961, 1, 2.6353919e-013, 2.20464535e-025, 2.26873208e-013, 0.999996424, -2.69013165e-013, 2.35117084e-025, -1.83734972e-013, 1))
  624. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.400000036, 0.400000006))
  625. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-2.09933496, 0.00994968414, -1.1000061, -7.43166083e-007, 0.999996424, 2.72369789e-007, 1.49011719e-008, -2.72368425e-007, 1, 1, 7.431629e-007, -1.49009649e-008))
  626. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  627. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.210000008, 0.600000024))
  628. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409999847, -0.404999018, -3.0040741e-005, 1, 1.05336483e-010, -5.11527077e-021, 1.05335976e-010, 1, -9.92765453e-011, -5.11568477e-021, -9.9276018e-011, 1))
  629. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.210000008, 0.600000024))
  630. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409999847, -1.60497594, -3.0040741e-005, 1, 1.12981839e-010, -5.89094849e-021, -1.12491558e-010, 1, -1.06496659e-010, -6.08833769e-021, 1.0604289e-010, 1))
  631. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.210000008, 0.600000024))
  632. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.409996033, -1.60497594, -3.0040741e-005, 1, 1.13225755e-010, -5.9168516e-021, -1.12735474e-010, 1, -1.06724032e-010, -6.11401341e-021, 1.06270263e-010, 1))
  633. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(1.0200001, 0.210000008, 0.210000008))
  634. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.60497594, 0.40499115, 1, 7.82292217e-011, -2.80034948e-021, -7.77389403e-011, 1, -7.37259559e-011, -2.93059226e-021, 7.32721869e-011, 1))
  635. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(1.0200001, 0.210000008, 0.210000008))
  636. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.60497594, -0.405024052, 1, 7.93888774e-011, -2.8813423e-021, -7.88986237e-011, 1, -7.48344303e-011, -3.02257208e-021, 7.43806614e-011, 1))
  637. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(1.0200001, 0.210000008, 0.210000008))
  638. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.404999018, -0.405024052, 1, 7.9389488e-011, -2.88135442e-021, 7.93889815e-011, 1, -7.48338752e-011, -2.88212869e-021, -7.48333479e-011, 1))
  639. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(0.200000003, 0.210000008, 0.600000024))
  640. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.409996033, -0.404999018, -3.0040741e-005, 1, 3.79056439e-011, -6.35164548e-022, 3.79058382e-011, 1, -3.57250896e-011, -6.35662047e-022, -3.57250896e-011, 1))
  641. Part=part(Enum.FormFactor.Custom,m,Enum.Material.DiamondPlate,0,0,"Institutional white","Part",Vector3.new(1.0200001, 0.210000008, 0.210000008))
  642. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.404999018, 0.40499115, 1, 7.82298046e-011, -2.80033434e-021, 7.8229298e-011, 1, -7.37254285e-011, -2.80000274e-021, -7.37249012e-011, 1))
  643.  
  644. function attackone()
  645. attack = true
  646. local con = LeftLeg.Touched:connect(function(hit) Damagefunc(hit,15,20,math.random(5,15),"Normal",RootPart,.2,1) end)
  647. so("http://roblox.com/asset/?id=200632211",LeftLeg,1,1)
  648. for i = 0,1,0.1 do
  649. swait()
  650. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-50),math.rad(0),math.rad(-90)),.3)
  651. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(50),math.rad(0),math.rad(20)),.3)
  652. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(40)), 0.3)
  653. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-50)), 0.3)
  654. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-30),math.rad(0),math.rad(0)),.3)
  655. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-80),math.rad(0),math.rad(0)),.3)
  656. end
  657. attack = false
  658. con:disconnect()
  659. end
  660.  
  661. function attacktwo()
  662. attack = true
  663. for i = 0,1,0.1 do
  664. swait()
  665. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(5),math.rad(0),math.rad(-80)),.3)
  666. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(70)),.3)
  667. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(20)), 0.3)
  668. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.5) * angles(math.rad(0), math.rad(-150), math.rad(-90)), 0.3)
  669. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(140),math.rad(-10)),.3)
  670. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-50),math.rad(-5)),.3)
  671. end
  672. so("http://roblox.com/asset/?id=200632211",LeftArm,1,.9)
  673. local con = LeftArm.Touched:connect(function(hit) Damagefunc(hit,15,20,math.random(5,15),"Normal",RootPart,.2,1) end)
  674. for i = 0,1,0.1 do
  675. swait()
  676. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(5),math.rad(0),math.rad(80)),.3)
  677. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  678. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(20)), 0.3)
  679. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(-10), math.rad(-90)), 0.3)
  680. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(-10)),.3)
  681. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-140),math.rad(-5)),.3)
  682. end
  683. attack = false
  684. con:disconnect()
  685. end
  686.  
  687. --[[remiders: PBPART1,PBPART2,PBPOLE,PBNEEDLE,HITBOX ]]--
  688.  
  689. function attackthree()
  690. attack = true
  691. for i = 0,1,0.1 do
  692. swait()
  693. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(20)),.3)
  694. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-20)),.3)
  695. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(20)), 0.3)
  696. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
  697. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(0)),.3)
  698. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(0)),.3)
  699. end
  700. local con = Hitbox.Touched:connect(function(hit) Damagefunc(hit,25,40,math.random(10,15),"Normal",RootPart,.2,1) end)
  701. so("http://roblox.com/asset/?id=240429891",Hitbox,1,1)
  702. so("http://roblox.com/asset/?id=240429289",Hitbox,1,1)
  703. for i = 0,1,0.1 do
  704. swait()
  705. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
  706. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
  707. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(50)), 0.3)
  708. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-40)), 0.3)
  709. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(60),math.rad(0)),.3)
  710. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-140),math.rad(0)),.3)
  711. PBNeedleweld.C0=clerp(PBNeedleweld.C0,cf(0,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  712. PBPoleweld.C0=clerp(PBPoleweld.C0,cf(0,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  713. PBPart1weld.C0=clerp(PBPart1weld.C0,cf(0,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  714. PBPart2weld.C0=clerp(PBPart2weld.C0,cf(0,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  715. Hitboxweld.C0=clerp(Hitboxweld.C0,cf(0,-1.,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  716. end
  717. attack = false
  718. con:disconnect()
  719. end
  720.  
  721. function attackfour()
  722. attack = true
  723. for i = 0,1,0.1 do
  724. swait()
  725. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(5),math.rad(0),math.rad(-80)),.3)
  726. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(70)),.3)
  727. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(150), math.rad(90)), 0.3)
  728. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-50)), 0.3)
  729. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(140),math.rad(-10)),.3)
  730. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-50),math.rad(-5)),.3)
  731. end
  732. so("http://roblox.com/asset/?id=240429891",Hitbox,1,.9)
  733. so("http://roblox.com/asset/?id=240429289",Hitbox,1,.8)
  734. local con = Hitbox.Touched:connect(function(hit) Damagefunc(hit,25,40,math.random(10,15),"Normal",RootPart,.2,1) end)
  735. for i = 0,1,0.1 do
  736. swait()
  737. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(5),math.rad(0),math.rad(80)),.3)
  738. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-70)),.3)
  739. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(50), math.rad(90)), 0.3)
  740. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-80)), 0.3)
  741. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(-10)),.3)
  742. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-140),math.rad(-5)),.3)
  743. PBNeedleweld.C0=clerp(PBNeedleweld.C0,cf(0,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  744. PBPoleweld.C0=clerp(PBPoleweld.C0,cf(0,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  745. PBPart1weld.C0=clerp(PBPart1weld.C0,cf(0,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  746. PBPart2weld.C0=clerp(PBPart2weld.C0,cf(0,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  747. Hitboxweld.C0=clerp(Hitboxweld.C0,cf(0,-1.,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  748. end
  749. attack = false
  750. con:disconnect()
  751. end
  752.  
  753. mouse.Button1Down:connect(function()
  754. if attack == false and
  755. attacktype == 1 then
  756. attacktype = 2
  757. attackone()
  758. elseif attack == false and
  759. attacktype == 2 then
  760. attacktype = 3
  761. attacktwo()
  762. elseif attack == false and
  763. attacktype == 3 then
  764. attacktype = 4
  765. attackthree()
  766. elseif attack == false and
  767. attacktype == 4 then
  768. attacktype = 1
  769. attackfour()
  770. end
  771. end)
  772.  
  773. mouse.KeyDown:connect(function(k)
  774. k=k:lower()
  775.  
  776. end)
  777.  
  778.  
  779. local sine = 0
  780. local change = 1
  781. local val = 0
  782.  
  783. while true do
  784. swait()
  785. sine = sine + change
  786. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  787. local velderp=RootPart.Velocity.y
  788. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  789. if equipped==true or equipped==false then
  790. if attack==false then
  791. idle=idle+1
  792. else
  793. idle=0
  794. end
  795. if idle>=500 then
  796. if attack==false then
  797. --Sheath()
  798. end
  799. end
  800. if RootPart.Velocity.y > 1 and hitfloor==nil then
  801. Anim="Jump"
  802. if attack==false then
  803. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  804. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  805. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(20)), 0.3)
  806. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-20)), 0.3)
  807. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(10),math.rad(90),math.rad(0)),.3)
  808. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-15),math.rad(-90),math.rad(0)),.3)
  809. PBNeedleweld.C0=clerp(PBNeedleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  810. PBPoleweld.C0=clerp(PBPoleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  811. PBPart1weld.C0=clerp(PBPart1weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  812. PBPart2weld.C0=clerp(PBPart2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  813. Hitboxweld.C0=clerp(Hitboxweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4)
  814. end
  815. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  816. Anim="Fall"
  817. if attack==false then
  818. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  819. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  820. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(30)), 0.3)
  821. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)), 0.3)
  822. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(20),math.rad(90),math.rad(0)),.3)
  823. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-20),math.rad(-90),math.rad(0)),.3)
  824. PBNeedleweld.C0=clerp(PBNeedleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  825. PBPoleweld.C0=clerp(PBPoleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  826. PBPart1weld.C0=clerp(PBPart1weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  827. PBPart2weld.C0=clerp(PBPart2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  828. Hitboxweld.C0=clerp(Hitboxweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  829. end
  830. elseif torvel<1 and hitfloor~=nil then
  831. Anim="Idle"
  832. if attack==false then
  833. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(5),math.rad(0),math.rad(-20)),.3)
  834. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(20)),.3)
  835. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(20)), 0.3)
  836. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
  837. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.3)
  838. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(-5)),.3)
  839. PBNeedleweld.C0=clerp(PBNeedleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  840. PBPoleweld.C0=clerp(PBPoleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  841. PBPart1weld.C0=clerp(PBPart1weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  842. PBPart2weld.C0=clerp(PBPart2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  843. Hitboxweld.C0=clerp(Hitboxweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  844. end
  845. elseif torvel>2 and hitfloor~=nil then
  846. Anim="Walk"
  847. if attack==false then
  848. change=3
  849. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  850. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  851. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(10)), 0.3)
  852. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-20)), 0.3)
  853. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-15)),.3)
  854. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-15)),.3)
  855. PBNeedleweld.C0=clerp(PBNeedleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  856. PBPoleweld.C0=clerp(PBPoleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  857. PBPart1weld.C0=clerp(PBPart1weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  858. PBPart2weld.C0=clerp(PBPart2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  859. Hitboxweld.C0=clerp(Hitboxweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  860. end
  861. end
  862. end
  863. if #Effects>0 then
  864. --table.insert(Effects,{prt,"Block1",delay})
  865. for e=1,#Effects do
  866. if Effects[e]~=nil then
  867. --for j=1,#Effects[e] do
  868. local Thing=Effects[e]
  869. if Thing~=nil then
  870. local Part=Thing[1]
  871. local Mode=Thing[2]
  872. local Delay=Thing[3]
  873. local IncX=Thing[4]
  874. local IncY=Thing[5]
  875. local IncZ=Thing[6]
  876. if Thing[1].Transparency<=1 then
  877. if Thing[2]=="Block1" then
  878. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  879. Mesh=Thing[1].Mesh
  880. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  881. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  882. elseif Thing[2]=="Cylinder" then
  883. Mesh=Thing[1].Mesh
  884. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  885. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  886. elseif Thing[2]=="Blood" then
  887. Mesh=Thing[7]
  888. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  889. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  890. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  891. elseif Thing[2]=="Elec" then
  892. Mesh=Thing[1].Mesh
  893. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  894. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  895. elseif Thing[2]=="Disappear" then
  896. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  897. end
  898. else
  899. Part.Parent=nil
  900. table.remove(Effects,e)
  901. end
  902. end
  903. --end
  904. end
  905. end
  906. end
  907. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement