Advertisement
Toastymctoast

some script

May 28th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.60 KB | None | 0 0
  1. function QuaternionSlerp(a, b, t)
  2. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  3. local startInterp, finishInterp;
  4. if cosTheta >= 0.0001 then
  5. if (1 - cosTheta) > 0.0001 then
  6. local theta = ACOS(cosTheta)
  7. local invSinTheta = 1 / SIN(theta)
  8. startInterp = SIN((1 - t) * theta) * invSinTheta
  9. finishInterp = SIN(t * theta) * invSinTheta
  10. else
  11. startInterp = 1 - t
  12. finishInterp = t
  13. end
  14. else
  15. if (1 + cosTheta) > 0.0001 then
  16. local theta = ACOS(-cosTheta)
  17. local invSinTheta = 1 / SIN(theta)
  18. startInterp = SIN((t - 1) * theta) * invSinTheta
  19. finishInterp = SIN(t * theta) * invSinTheta
  20. else
  21. startInterp = t - 1
  22. finishInterp = t
  23. end
  24. end
  25. 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
  26. end
  27.  
  28. function Clerp(a, b, t)
  29. local qa = {QuaternionFromCFrame(a)}
  30. local qb = {QuaternionFromCFrame(b)}
  31. local ax, ay, az = a.x, a.y, a.z
  32. local bx, by, bz = b.x, b.y, b.z
  33. local _t = 1 - t
  34. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  35. end
  36.  
  37. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  38. local frame = IT("Frame")
  39. frame.BackgroundTransparency = TRANSPARENCY
  40. frame.BorderSizePixel = BORDERSIZEPIXEL
  41. frame.Position = POSITION
  42. frame.Size = SIZE
  43. frame.BackgroundColor3 = COLOR
  44. frame.BorderColor3 = BORDERCOLOR
  45. frame.Name = NAME
  46. frame.Parent = PARENT
  47. return frame
  48. end
  49.  
  50. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  51. local label = IT("TextLabel")
  52. label.BackgroundTransparency = 1
  53. label.Size = UD2(1, 0, 1, 0)
  54. label.Position = UD2(0, 0, 0, 0)
  55. label.TextColor3 = TEXTCOLOR
  56. label.TextStrokeTransparency = STROKETRANSPARENCY
  57. label.TextTransparency = TRANSPARENCY
  58. label.FontSize = TEXTFONTSIZE
  59. label.Font = TEXTFONT
  60. label.BorderSizePixel = BORDERSIZEPIXEL
  61. label.TextScaled = false
  62. label.Text = Riva the Gunner
  63. label.Name = NAME
  64. label.Parent = PARENT
  65. return label
  66. end
  67.  
  68. function NoOutlines(PART)
  69. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  70. end
  71.  
  72. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  73. local NEWWELD = IT(TYPE)
  74. NEWWELD.Part0 = PART0
  75. NEWWELD.Part1 = PART1
  76. NEWWELD.C0 = C0
  77. NEWWELD.C1 = C1
  78. NEWWELD.Parent = PARENT
  79. return NEWWELD
  80. end
  81.  
  82. local S = IT("Sound")
  83. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  84. local NEWSOUND = nil
  85. coroutine.resume(coroutine.create(function()
  86. NEWSOUND = S:Clone()
  87. NEWSOUND.Parent = PARENT
  88. NEWSOUND.Volume = VOLUME
  89. NEWSOUND.Pitch = PITCH
  90. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  91. NEWSOUND:play()
  92. if DOESLOOP == true then
  93. NEWSOUND.Looped = true
  94. else
  95. repeat wait(1) until NEWSOUND.Playing == false
  96. NEWSOUND:remove()
  97. end
  98. end))
  99. return NEWSOUND
  100. end
  101.  
  102. function CFrameFromTopBack(at, top, back)
  103. local right = top:Cross(back)
  104. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  105. end
  106.  
  107. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  108. function WACKYEFFECT(Table)
  109. local TYPE = (Table.EffectType or "Sphere")
  110. local SIZE = (Table.Size or VT(1,1,1))
  111. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  112. local TRANSPARENCY = (Table.Transparency or 0)
  113. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  114. local CFRAME = (Table.CFrame or Torso.CFrame)
  115. local MOVEDIRECTION = (Table.MoveToPos or nil)
  116. local ROTATION1 = (Table.RotationX or 0)
  117. local ROTATION2 = (Table.RotationY or 0)
  118. local ROTATION3 = (Table.RotationZ or 0)
  119. local MATERIAL = (Table.Material or "Neon")
  120. local COLOR = (Table.Color or C3(1,1,1))
  121. local TIME = (Table.Time or 45)
  122. local SOUNDID = (Table.SoundID or nil)
  123. local SOUNDPITCH = (Table.SoundPitch or nil)
  124. local SOUNDVOLUME = (Table.SoundVolume or nil)
  125. coroutine.resume(coroutine.create(function()
  126. local PLAYSSOUND = false
  127. local SOUND = nil
  128. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  129. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  130. PLAYSSOUND = true
  131. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  132. end
  133. EFFECT.Color = COLOR
  134. local MSH = nil
  135. if TYPE == "Sphere" then
  136. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  137. elseif TYPE == "Block" then
  138. MSH = IT("BlockMesh",EFFECT)
  139. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  140. elseif TYPE == "Wave" then
  141. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  142. elseif TYPE == "Ring" then
  143. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  144. elseif TYPE == "Slash" then
  145. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  146. elseif TYPE == "Round Slash" then
  147. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  148. elseif TYPE == "Swirl" then
  149. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  150. elseif TYPE == "Skull" then
  151. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  152. elseif TYPE == "Crystal" then
  153. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  154. end
  155. if MSH ~= nil then
  156. local MOVESPEED = nil
  157. if MOVEDIRECTION ~= nil then
  158. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  159. end
  160. local GROWTH = SIZE - ENDSIZE
  161. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  162. if TYPE == "Block" then
  163. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  164. else
  165. EFFECT.CFrame = CFRAME
  166. end
  167. for LOOP = 1, TIME+1 do
  168. Swait()
  169. MSH.Scale = MSH.Scale - GROWTH/TIME
  170. if TYPE == "Wave" then
  171. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  172. end
  173. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  174. if TYPE == "Block" then
  175. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  176. else
  177. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  178. end
  179. if MOVEDIRECTION ~= nil then
  180. local ORI = EFFECT.Orientation
  181. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  182. EFFECT.Orientation = ORI
  183. end
  184. end
  185. if PLAYSSOUND == false then
  186. EFFECT:remove()
  187. else
  188. SOUND.Stopped:Connect(function()
  189. EFFECT:remove()
  190. end)
  191. end
  192. else
  193. if PLAYSSOUND == false then
  194. EFFECT:remove()
  195. else
  196. repeat Swait() until SOUND.Playing == false
  197. EFFECT:remove()
  198. end
  199. end
  200. end))
  201. end
  202.  
  203. function MakeForm(PART,TYPE)
  204. if TYPE == "Cyl" then
  205. local MSH = IT("CylinderMesh",PART)
  206. elseif TYPE == "Ball" then
  207. local MSH = IT("SpecialMesh",PART)
  208. MSH.MeshType = "Sphere"
  209. elseif TYPE == "Wedge" then
  210. local MSH = IT("SpecialMesh",PART)
  211. MSH.MeshType = "Wedge"
  212. end
  213. end
  214.  
  215. Debris = game:GetService("Debris")
  216.  
  217. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  218. local DIRECTION = CF(StartPos,EndPos).lookVector
  219. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  220. end
  221.  
  222. function turnto(position)
  223. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  224. end
  225.  
  226. function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
  227. if FLOOR ~= nil then
  228. coroutine.resume(coroutine.create(function()
  229. local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
  230. PART.CFrame = CF(POSITION)
  231. for i = 1, 45 do
  232. local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
  233. RingPiece.Material = FLOOR.Material
  234. RingPiece.Color = FLOOR.Color
  235. RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*4, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  236. Debris:AddItem(RingPiece,SWAIT)
  237. end
  238. PART:remove()
  239. end))
  240. end
  241. end
  242.  
  243. function CreateFlyingDebree(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH,DOES360)
  244. if FLOOR ~= nil then
  245. for i = 1, AMOUNT do
  246. local DEBREE = CreatePart(3, Effects, "Neon", 0, 0, "Peal", "Debree", BLOCKSIZE, false)
  247. DEBREE.Material = FLOOR.Material
  248. DEBREE.Color = FLOOR.Color
  249. DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  250. if DOES360 == true then
  251. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH))
  252. else
  253. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),STRENGTH,MRANDOM(-STRENGTH,STRENGTH))
  254. end
  255. coroutine.resume(coroutine.create(function()
  256. Swait(15)
  257. DEBREE.Parent = workspace
  258. DEBREE.CanCollide = true
  259. Debris:AddItem(DEBREE,SWAIT)
  260. end))
  261. end
  262. end
  263. end
  264.  
  265. function SpawnTrail(FROM,TO)
  266. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Pearl", "Arrow", VT(0,0,0))
  267. MakeForm(TRAIL,"Cyl")
  268. local DIST = (FROM - TO).Magnitude
  269. TRAIL.Size = VT(0.1,DIST,0.1)
  270. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  271. coroutine.resume(coroutine.create(function()
  272. for i = 1, 5 do
  273. Swait()
  274. TRAIL.Transparency = TRAIL.Transparency + 0.1
  275. end
  276. TRAIL:remove()
  277. end))
  278. end
  279.  
  280. local Decal = IT("Decal")
  281. function SpawnBulletHole(POSITION)
  282. local O1 = CreatePart(3, Effects, "Neon", 0, 1, "Really red", "Bullet hole", VT(0.2,0,0.2))
  283. local decal = Decal:Clone()
  284. decal.Parent = O1
  285. decal.Face = "Top"
  286. decal.Texture = "http://www.roblox.com/asset/?id=130624105"
  287. local decal2 = Decal:Clone()
  288. decal2.Parent = O1
  289. decal2.Face = "Bottom"
  290. decal2.Texture = "http://www.roblox.com/asset/?id=130624105"
  291. O1.CFrame = POSITION*ANGLES(RAD(0),RAD(MRANDOM(-180,180)),RAD(0))
  292. Debris:AddItem(O1,5)
  293. end
  294.  
  295. local asd = Instance.new("ParticleEmitter")
  296. asd.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(.5, 0, 0))
  297. asd.LightEmission = .1
  298. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  299. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 2)})
  300. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  301. asd.Transparency = bbb
  302. asd.Size = aaa
  303. asd.ZOffset = .9
  304. asd.Acceleration = Vector3.new(0, -15, 0)
  305. asd.LockedToPart = false
  306. asd.EmissionDirection = "Back"
  307. asd.Lifetime = NumberRange.new(1, 2)
  308. asd.Rotation = NumberRange.new(-100, 100)
  309. asd.RotSpeed = NumberRange.new(-100, 100)
  310. asd.Speed = NumberRange.new(10)
  311. asd.Enabled = false
  312. asd.VelocitySpread = 999
  313.  
  314. function getbloody(victim,amount)
  315. local PART = IT("Part",Effects)
  316. PART.Transparency = 1
  317. PART.Size = victim.Size
  318. PART.Anchored = true
  319. PART.CanCollide = false
  320. PART.CFrame = CF(victim.Position)
  321. local HITPLAYERSOUNDS = {"356551938","264486467"}
  322. Debris:AddItem(PART,5)
  323. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  324. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  325. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  326. local prtcl = asd:Clone()
  327. prtcl.Parent = PART
  328. prtcl:Emit(amount*10)
  329. end
  330.  
  331. function BulletDetection(FROM,TO)
  332. local AIMHIT,AIMPOS,NORMAL = CastProperRay(FROM,TO,2000,Character)
  333. coroutine.resume(coroutine.create(function()
  334. if AIMHIT ~= nil then
  335. if AIMHIT.Parent ~= Character then
  336. if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") or AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  337. if AIMHIT.Name ~= "Head" and AIMHIT.Parent.ClassName ~= "Accessory" then
  338. ApplyDamage(AIMHIT.Parent:FindFirstChildOfClass("Humanoid"),MRANDOM(15,25),AIMHIT)
  339. elseif AIMHIT.Name == "Head" or AIMHIT.Parent.ClassName == "Accessory" then
  340. if AIMHIT.Parent.ClassName == "Accessory" then
  341. if AIMHIT:FindFirstChild("HatAttachment") or AIMHIT:FindFirstChild("FaceFrontAttachment") or AIMHIT:FindFirstChild("HairAttachment") then
  342. AIMHIT.Parent.Parent:BreakJoints()
  343. if AIMHIT.Parent.Parent:FindFirstChild("Head") then
  344. getbloody(AIMHIT.Parent.Parent.Head,15)
  345. AIMHIT.Parent.Parent.Head:remove()
  346. StatLabel(AIMHIT.CFrame * CF(0, 0 + (AIMHIT.Size.z - 1), 0), "Headshot!", C3(1,0,0))
  347. end
  348. else
  349. ApplyDamage(AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid"),MRANDOM(25,65),AIMHIT)
  350. end
  351. elseif AIMHIT.Name == "Head" then
  352. getbloody(AIMHIT,15)
  353. AIMHIT.Parent:BreakJoints()
  354. AIMHIT:remove()
  355. StatLabel(AIMHIT.CFrame * CF(0, 0 + (AIMHIT.Size.z - 1), 0), "Headshot!", C3(1,0,0))
  356. end
  357. end
  358. else
  359. CreateFlyingDebree(AIMHIT,CF(AIMPOS),7,VT(0.1,0.1,0.1),5,35,true)
  360. SpawnBulletHole(CF(AIMPOS,AIMPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0)))
  361. end
  362. end
  363. end
  364. end))
  365. return AIMHIT,AIMPOS,NORMAL
  366. end
  367.  
  368. --//=================================\\
  369. --|| WEAPON CREATION
  370. --\\=================================//
  371.  
  372. for i = 1, 35 do
  373. local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/35.2, "Dark stone grey", "FaceGradient", VT(1.01,0.5,1.01),false)
  374. FACE.Color = C3(0,0,0)
  375. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  376. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  377. end
  378. local EYE = CreatePart(3, Character, "Neon", 0, 0, "White", "Eyeball", VT(0.15,0.15,0.15),false)
  379. MakeForm(EYE,"Ball")
  380. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.26,-0.55), CF(0, 0, 0))
  381. local EYE2 = CreatePart(3, Character, "Neon", 0, 0, "Really black", "Eyeball", VT(0.15,0.15,0.15),false)
  382. MakeForm(EYE2,"Ball")
  383. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE2, CF(-0.15,0.26,-0.55), CF(0, 0, 0))
  384. local Gun1 = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Gun1", VT(0, 0, 0),false)
  385. local HandleMesh = CreateMesh("SpecialMesh", Gun1, "FileMesh", "468351345", "468351348", VT(0.06,0.06,0.06), VT(0,0, 0))
  386. local Weld = CreateWeldOrSnapOrMotor("Weld", Gun1, RightArm, Gun1, CF(0, -1.8, -0.2) * ANGLES(RAD(0), RAD(90), RAD(-90)), CF(0, 0, 0))
  387.  
  388. local Gun2 = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Gun2", VT(0, 0, 0),false)
  389. local HandleMesh = CreateMesh("SpecialMesh", Gun2, "FileMesh", "468351345", "468351348", VT(0.06,0.06,0.06), VT(0,0, 0))
  390. local Weld = CreateWeldOrSnapOrMotor("Weld", Gun2, LeftArm, Gun2, CF(0, -1.8, -0.2) * ANGLES(RAD(0), RAD(90), RAD(-90)), CF(0, 0, 0))
  391.  
  392. local BODY = {}
  393.  
  394. for _, c in pairs(Character:GetDescendants()) do
  395. if c:IsA("BasePart") and c.Name ~= "Handle" then
  396. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  397. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  398. end
  399.  
  400. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  401. elseif c:IsA("JointInstance") then
  402. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  403. end
  404. end
  405.  
  406. for e = 1, #BODY do
  407. if BODY[e] ~= nil then
  408. local STUFF = BODY[e]
  409. local PART = STUFF[1]
  410. local PARENT = STUFF[2]
  411. local MATERIAL = STUFF[3]
  412. local COLOR = STUFF[4]
  413. local TRANSPARENCY = STUFF[5]
  414. if PART.ClassName == "Part" and PART ~= RootPart then
  415. PART.Material = MATERIAL
  416. PART.Color = COLOR
  417. PART.Transparency = TRANSPARENCY
  418. end
  419. PART.AncestryChanged:Connect(function()
  420. PART.Parent = PARENT
  421. end)
  422. end
  423. end
  424.  
  425. function refit()
  426. Character.Parent = workspace
  427. for e = 1, #BODY do
  428. if BODY[e] ~= nil then
  429. local STUFF = BODY[e]
  430. local PART = STUFF[1]
  431. local PARENT = STUFF[2]
  432. local MATERIAL = STUFF[3]
  433. local COLOR = STUFF[4]
  434. local TRANSPARENCY = STUFF[5]
  435. if PART.ClassName == "Part" and PART ~= RootPart then
  436. PART.Material = MATERIAL
  437. PART.Color = COLOR
  438. PART.Transparency = TRANSPARENCY
  439. end
  440. if PART.Parent ~= PARENT then
  441. Humanoid:remove()
  442. PART.Parent = PARENT
  443. Humanoid = IT("Humanoid",Character)
  444. end
  445. end
  446. end
  447. end
  448.  
  449. local SKILLTEXTCOLOR = C3(0,0,0)
  450. local SKILLFONT = "SciFi"
  451. local SKILLTEXTSIZE = 7
  452.  
  453. Humanoid.Died:connect(function()
  454. refit()
  455. end)
  456.  
  457. function Blink()
  458. coroutine.resume(coroutine.create(function()
  459. if EYE ~= nil then
  460. for i = 1, 5 do
  461. Swait()
  462. EYE.Mesh.Scale = EYE.Mesh.Scale - VT(0,0.2,0)
  463. EYE2.Mesh.Scale = EYE.Mesh.Scale
  464. end
  465. for i = 1, 7 do
  466. Swait()
  467. EYE.Mesh.Scale = EYE.Mesh.Scale + VT(0,0.2,0)
  468. EYE2.Mesh.Scale = EYE.Mesh.Scale
  469. end
  470. EYE.Mesh.Scale = VT(1,1,1)
  471. EYE2.Mesh.Scale = EYE.Mesh.Scale
  472. end
  473. end))
  474. end
  475.  
  476. local AMMO1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.80, 0), UD2(0.07, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Ammo 1 Frame")
  477. local AMMO2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.80, 0), UD2(0.07, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Ammo 2 Frame")
  478. local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  479. local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  480.  
  481. local SKILL3TEXT = CreateLabel(SKILL1FRAME, "[Z] Shot", C3(0,0,0), 7, SKILLFONT, 0, 2, 1, "Text 3")
  482. local SKILL4TEXT = CreateLabel(SKILL2FRAME, "[X] HeadShot", C3(1,0,0), 8, "Antique", 0, 2, 1, "Text 4")
  483. local AMMOIMAGE1 = IT("ImageLabel",AMMO1FRAME)
  484.  
  485. AMMOIMAGE1.Size = UD2(1,0,1,0)
  486. AMMOIMAGE1.BackgroundTransparency = 1
  487. AMMOIMAGE1.BorderSizePixel = 0
  488. AMMOIMAGE1.Image = "http://www.roblox.com/asset/?id=0"
  489. local AMMOIMAGE2 = IT("ImageLabel",AMMO2FRAME)
  490. AMMOIMAGE2.Size = UD2(1,0,1,0)
  491. AMMOIMAGE2.BackgroundTransparency = 1
  492. AMMOIMAGE2.BorderSizePixel = 0
  493. AMMOIMAGE2.Image = "http://www.roblox.com/asset/?id=0"
  494.  
  495. --//=================================\\
  496. --|| DAMAGE FUNCTIONS
  497. --\\=================================//
  498.  
  499. function StatLabel(CFRAME, TEXT, COLOR)
  500. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  501. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  502. local BODYGYRO = IT("BodyGyro", STATPART)
  503. game:GetService("Debris"):AddItem(STATPART ,5)
  504. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  505. BILLBOARDGUI.Adornee = STATPART
  506. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  507. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  508. BILLBOARDGUI.AlwaysOnTop = false
  509. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  510. TEXTLABEL.BackgroundTransparency = 1
  511. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  512. TEXTLABEL.Text = TEXT
  513. TEXTLABEL.Font = SKILLFONT
  514. TEXTLABEL.FontSize="Size42"
  515. TEXTLABEL.TextColor3 = COLOR
  516. TEXTLABEL.TextStrokeTransparency = 0
  517. TEXTLABEL.TextScaled = true
  518. TEXTLABEL.TextWrapped = true
  519. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  520. for i = 1, 10 do
  521. Swait()
  522. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  523. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/10)
  524. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  525. end
  526. THEPART.Parent = nil
  527. end),STATPART, TEXTLABEL)
  528. end
  529.  
  530. --//=================================\\
  531. --|| DAMAGING
  532. --\\=================================//
  533.  
  534. function ApplyDamage(Humanoid,Damage,TorsoPart)
  535. local defence = Instance.new("BoolValue",Humanoid.Parent)
  536. defence.Name = ("HitBy"..Player.Name)
  537. game:GetService("Debris"):AddItem(defence, 0.001)
  538. Damage = Damage * DAMAGEMULTIPLIER
  539. if Humanoid.Health ~= 0 then
  540. local CritChance = MRANDOM(1,100)
  541. if Damage > Humanoid.Health then
  542. Damage = math.ceil(Humanoid.Health)
  543. if Damage == 0 then
  544. Damage = 0.1
  545. end
  546. end
  547. Humanoid.Health = Humanoid.Health - Damage
  548. StatLabel(TorsoPart.CFrame * CF(0, 0 + (TorsoPart.Size.z - 1), 0), Damage, C3(0, 0, 0))
  549. end
  550. end
  551.  
  552. function Ghostify(POSITION,RANGE)
  553. local CHILDREN = workspace:GetDescendants()
  554. for index, CHILD in pairs(CHILDREN) do
  555. if CHILD.ClassName == "Model" and CHILD ~= Character and CHILD.Parent ~= Effects then
  556. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  557. if HUM then
  558. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  559. if TORSO then
  560. if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
  561. local GHOST = GHOSTBASE:Clone()
  562. GHOST.Parent = Effects
  563. GHOST.Torso.CFrame = TORSO.CFrame
  564. table.insert(GHOSTS,GHOST)
  565. CHILD:remove()
  566. end
  567. end
  568. end
  569. end
  570. end
  571. end
  572.  
  573. --//=================================\\
  574. --|| ATTACK FUNCTIONS AND STUFF
  575. --\\=================================//
  576.  
  577. function Shell()
  578. ATTACK = true
  579. Rooted = false
  580. local STOP = false
  581. repeat
  582. if AMMO > 0 then
  583. if COMBO == 1 then
  584. COMBO = 2
  585. for i=0, 0.3, 0.1 / Animation_Speed do
  586. Swait()
  587. turnto(Mouse.Hit.p)
  588. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(86)), 0.75 / Animation_Speed)
  589. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-86)), 0.75 / Animation_Speed)
  590. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(86)) * RIGHTSHOULDERC0, 0.75/ Animation_Speed)
  591. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  592. if HITFLOOR == true then
  593. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(25), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.75/ Animation_Speed)
  594. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.75 / Animation_Speed)
  595. elseif HITFLOOR == false then
  596. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.75 / Animation_Speed)
  597. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.75 / Animation_Speed)
  598. end
  599. end
  600. local AIMHIT,AIMPOS,NORMAL = BulletDetection(Gun1.Position,Mouse.Hit.p)
  601. SpawnTrail(Gun1.CFrame*CF(1.25,0.2,0).p,AIMPOS)
  602. CreateSound(680140087, Gun1, 5, 1, false)
  603. for i=0, 0.1, 0.1 / Animation_Speed do
  604. Swait()
  605. turnto(AIMPOS)
  606. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(86)), 0.75 / Animation_Speed)
  607. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-86)), 0.75 / Animation_Speed)
  608. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(86)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  609. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.75/ Animation_Speed)
  610. if HITFLOOR == true then
  611. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(25), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.75 / Animation_Speed)
  612. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.75 / Animation_Speed)
  613. elseif HITFLOOR == false then
  614. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)),0.75 / Animation_Speed)
  615. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.75 / Animation_Speed)
  616. end
  617. end
  618. elseif COMBO == 2 then
  619. COMBO = 1
  620. for i=0, 0.3, 0.1 / Animation_Speed do
  621. Swait()
  622. turnto(Mouse.Hit.p)
  623. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)),0.75 / Animation_Speed)
  624. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.75 / Animation_Speed)
  625. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  626. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  627. if HITFLOOR == true then
  628. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.75 / Animation_Speed)
  629. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)),0.75 / Animation_Speed)
  630. elseif HITFLOOR == false then
  631. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.75 / Animation_Speed)
  632. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.75 / Animation_Speed)
  633. end
  634. end
  635. AMMO = AMMO - 0
  636. local AIMHIT,AIMPOS,NORMAL = BulletDetection(Gun2.Position,Mouse.Hit.p)
  637. CreateSound(680140087, Gun2, 5, 1, false)
  638. SpawnTrail(Gun2.CFrame*CF(1.25,0.2,0).p,AIMPOS)
  639. for i=0, 0.1, 0.1 / Animation_Speed do
  640. Swait()
  641. turnto(AIMPOS)
  642. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.75 / Animation_Speed)
  643. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.75 / Animation_Speed)
  644. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  645. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  646. if HITFLOOR == true then
  647. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.75 / Animation_Speed)
  648. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.75 / Animation_Speed)
  649. elseif HITFLOOR == false then
  650. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.75 / Animation_Speed)
  651. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.75 / Animation_Speed)
  652. end
  653. end
  654. end
  655. else
  656. STOP = true
  657. end
  658. until KEYHOLD == false or STOP == true
  659. ATTACK = false
  660. Rooted = false
  661. end
  662.  
  663. function Taunt()
  664. ATTACK = true
  665. local LAUGH = nil
  666. coroutine.resume(coroutine.create(function()
  667. repeat
  668. Swait()
  669. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 - 0.04 * SIN(SINE / 24)*SIZE, 0 + 0.04 * SIN(SINE / 12)*SIZE, 0 + 0.05*SIZE * COS(SINE / 12)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0 - 2.5 * SIN(SINE / 24)), RAD(0)), 1 / Animation_Speed)
  670. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.1*SIZE) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-45)), 1 / Animation_Speed)
  671. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25*SIZE, 0.15*SIZE, -0.5*SIZE) * ANGLES(RAD(170), RAD(-25), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  672. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE, 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  673. RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE + 0.06 * SIN(SINE / 24) - 0.05*SIZE * COS(SINE / 12), -0.01*SIZE) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-2 - 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
  674. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE - 0.06 * SIN(SINE / 24) - 0.05*SIZE * COS(SINE / 12), -0.01*SIZE) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(-75), RAD(0)) * ANGLES(RAD(-2 + 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
  675. until LAUGH ~= nil
  676. repeat
  677. Swait()
  678. LAUGH.Parent = Head
  679. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 - 0.04 * SIN(SINE / 24)*SIZE, 0 + 0.04 * SIN(SINE / 12)*SIZE, 0+(0.1*LAUGH.PlaybackLoudness/75) + 0.05*SIZE * COS(SINE / 12)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0 - 2.5 * SIN(SINE / 24)), RAD(0)), 1 / Animation_Speed)
  680. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.1*SIZE+(0.1*LAUGH.PlaybackLoudness/75)) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-45)), 1 / Animation_Speed)
  681. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25*SIZE, 0.15*SIZE+(0.1*LAUGH.PlaybackLoudness/75), -0.5*SIZE) * ANGLES(RAD(170), RAD(-25), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  682. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE+(0.1*LAUGH.PlaybackLoudness/75), 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  683. RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE-(0.1*LAUGH.PlaybackLoudness/75) + 0.06 * SIN(SINE / 24) - 0.05*SIZE * COS(SINE / 12), -0.01*SIZE) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-2 - 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
  684. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE-(0.1*LAUGH.PlaybackLoudness/75) - 0.06 * SIN(SINE / 24) - 0.05*SIZE * COS(SINE / 12), -0.01*SIZE) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(-75), RAD(0)) * ANGLES(RAD(-2 + 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
  685. until LAUGH.Playing == false
  686. ATTACK = false
  687. end))
  688. wait(0.1)
  689. sick:Pause()
  690. LAUGH = CreateSound(130759239, Head, 10, 1, false)
  691. sick:Resume()
  692. end
  693.  
  694. function HEARTSTROKE()
  695. ATTACK = true
  696. Rooted = false
  697. CreateSound(1112042117, Torso, 5, 1, false)
  698. WACKYEFFECT({EffectType = "Wave", Size = VT(0,1,0), Size2 = VT(8,0.3,8), Transparency = 0, Transparency2 = 1, CFrame = RootPart.CFrame*CF(0,0,1)*ANGLES(RAD(90),RAD(0),RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  699. WACKYEFFECT({EffectType = "Wave", Size = VT(0,1,0), Size2 = VT(8,0.3,8), Transparency = 0, Transparency2 = 1, CFrame = RootPart.CFrame*CF(0,0,1)*ANGLES(RAD(90),RAD(0),RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  700. for i = 1, 50 do
  701. local DASHTHROUGH = Raycast(RootPart.Position, RootPart.CFrame.lookVector, 4, Character)
  702. RootPart.CFrame = RootPart.CFrame*CF(0,0,-2)
  703. if DASHTHROUGH ~= nil then
  704. if DASHTHROUGH.Parent:FindFirstChildOfClass("Humanoid") then
  705. local HUM = DASHTHROUGH.Parent:FindFirstChildOfClass("Humanoid")
  706. local TORSO = DASHTHROUGH.Parent:FindFirstChild("Torso") or DASHTHROUGH.Parent:FindFirstChild("UpperTorso")
  707. if TORSO ~= nil and DASHTHROUGH.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then
  708. Rooted = true
  709. local SOUND = CreateSound("0", TORSO, 10, 1,false)
  710. RootPart.CFrame = RootPart.CFrame*CF(0,0,-12)
  711. RootPart.CFrame = CF(RootPart.Position,TORSO.Position)*ANGLES(RAD(0),RAD(180),RAD(0))
  712. for i=0, 0.5, 0.1 / Animation_Speed do
  713. Swait()
  714. TORSO.Anchored = true
  715. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, -1.2) * ANGLES(RAD(65), RAD(0), RAD(0)), 3 / Animation_Speed)
  716. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 3 / Animation_Speed)
  717. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, 0.5) * ANGLES(RAD(-35), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 3 / Animation_Speed)
  718. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, 0.5) * ANGLES(RAD(-40), RAD(0), RAD(15)) * LEFTSHOULDERC0, 3 / Animation_Speed)
  719. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -1) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 3 / Animation_Speed)
  720. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.3, -1) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 3 / Animation_Speed)
  721. end
  722. TORSO.Anchored = false
  723. TORSO.Parent:BreakJoints()
  724. if TORSO.Parent:FindFirstChild("Head") then
  725. getbloody(TORSO.Parent:FindFirstChild("Head"),15)
  726. SpawnTrail(Gun1.CFrame*CF(1.25,0.2,0).p,TORSO.Parent:FindFirstChild("Head").Position)
  727. TORSO.Parent:FindFirstChild("Head"):remove()
  728. CreateSound(680140087, Gun1, 5, 1, false)
  729. AMMO = AMMO - 1
  730. end
  731. SOUND:remove()
  732. SpawnTrail(Gun2.CFrame*CF(1.25,0.2,0).p,TORSO.Position)
  733. CreateSound(680140087, Gun2, 5, 1, false)
  734. StatLabel(TORSO.CFrame * CF(0, 0 + (TORSO.Size.z - 1), 0), "Heartstruck!", C3(1,0,0))
  735. AMMO = AMMO - 1
  736. for i=0, 0.1, 0.1 / Animation_Speed do
  737. Swait()
  738. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, -1.2) * ANGLES(RAD(65), RAD(0), RAD(0)), 3 / Animation_Speed)
  739. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 3 / Animation_Speed)
  740. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, 0.5) * ANGLES(RAD(-35), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 3 / Animation_Speed)
  741. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, 0.5) * ANGLES(RAD(-40), RAD(0), RAD(15)) * LEFTSHOULDERC0, 3 / Animation_Speed)
  742. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -1) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 3 / Animation_Speed)
  743. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.3, -1) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 3 / Animation_Speed)
  744. end
  745. end
  746. end
  747. break
  748. end
  749. end
  750. ATTACK = false
  751. Rooted = false
  752. end
  753.  
  754.  
  755. --//=================================\\
  756. --|| ASSIGN THINGS TO KEYS
  757. --\\=================================//
  758.  
  759. function MouseDown(Mouse)
  760. if ATTACK == false then
  761. end
  762. end
  763.  
  764. function MouseUp(Mouse)
  765. HOLD = false
  766. end
  767.  
  768. function KeyDown(Key)
  769. KEYHOLD = true
  770. if Key == "z" and ATTACK == false then
  771. Shell()
  772. end
  773.  
  774. if Key == "t" and ATTACK == false then
  775. Taunt()
  776. end
  777.  
  778. if Key == "x" and ATTACK == false then
  779. HEARTSTROKE()
  780. end
  781.  
  782.  
  783.  
  784. end
  785.  
  786. function KeyUp(Key)
  787. KEYHOLD = false
  788. end
  789.  
  790. Mouse.Button1Down:connect(function(NEWKEY)
  791. MouseDown(NEWKEY)
  792. end)
  793. Mouse.Button1Up:connect(function(NEWKEY)
  794. MouseUp(NEWKEY)
  795. end)
  796. Mouse.KeyDown:connect(function(NEWKEY)
  797. KeyDown(NEWKEY)
  798. end)
  799. Mouse.KeyUp:connect(function(NEWKEY)
  800. KeyUp(NEWKEY)
  801. end)
  802.  
  803. --//=================================\\
  804. --\\=================================//
  805.  
  806.  
  807. function unanchor()
  808. if UNANCHOR == true then
  809. g = Character:GetChildren()
  810. for i = 1, #g do
  811. if g[i].ClassName == "Part" then
  812. g[i].Anchored = false
  813. end
  814. end
  815. end
  816. end
  817.  
  818.  
  819. --//=================================\\
  820. --|| WRAP THE WHOLE SCRIPT UP
  821. --\\=================================//
  822.  
  823. Humanoid.Changed:connect(function(Jump)
  824. if Jump == "Jump" and (Disable_Jump == true) then
  825. Humanoid.Jump = false
  826. end
  827. end)
  828.  
  829. local BLINKLOOP = 0
  830.  
  831. while true do
  832. Swait()
  833. script.Parent = WEAPONGUI
  834. ANIMATE.Parent = nil
  835. Humanoid.Parent = Character
  836. if Humanoid then
  837. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  838. IDLEANIMATION:Play()
  839. end
  840. SINE = SINE + CHANGE
  841. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  842. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  843. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  844. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  845. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  846. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  847. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  848. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  849. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  850. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  851. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  852. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  853. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  854. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  855. end
  856. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  857. ANIM = "Jump"
  858. if ATTACK == false then
  859. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  860. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  861. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  862. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  863. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  864. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  865. end
  866. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  867. ANIM = "Fall"
  868. if ATTACK == false then
  869. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  870. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  871. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  872. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  873. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  874. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  875. end
  876. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  877. ANIM = "Idle"
  878. if ATTACK == false then
  879. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
  880. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  881. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.5) * ANGLES(RAD(75), RAD(45), RAD(-25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  882. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  883. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  884. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  885. end
  886. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  887. ANIM = "Walk"
  888. if ATTACK == false then
  889. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  890. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  891. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.1, -0.4) * ANGLES(RAD(150), RAD(0), RAD(0))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  892. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-30 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  893. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  894. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  895. end
  896. end
  897. unanchor()
  898. Humanoid.MaxHealth = "inf"
  899. Humanoid.Health = "inf"
  900. if Rooted == false then
  901. Disable_Jump = false
  902. Humanoid.WalkSpeed = Speed
  903. elseif Rooted == true then
  904. Disable_Jump = true
  905. Humanoid.WalkSpeed = 0
  906. end
  907. sick.SoundId = "rbxassetid://157460916"
  908. sick.Looped = true
  909. sick.Pitch = 1
  910. sick.Volume = 10
  911. sick.Playing = true
  912. sick.Parent = Torso
  913. if Head:FindFirstChild("face") then
  914. Head.face.Texture = "rbxassetid://398675917"
  915. end
  916. BLINKLOOP = BLINKLOOP + 1
  917. if BLINKLOOP >=650 then
  918. BLINKLOOP = 0
  919. Blink()
  920. end
  921. if #GHOSTS>0 then
  922. for e=1,#GHOSTS do
  923. if GHOSTS[e]~=nil then
  924. local Thing=GHOSTS[e]
  925. if Thing~=nil then
  926. if Thing:FindFirstChild("Head") then
  927. if Thing:FindFirstChild("Head"):FindFirstChild("face") then
  928. Thing:FindFirstChild("Head").face.Texture = "rbxassetid://479674570"
  929. end
  930. if Thing:FindFirstChild("Head"):FindFirstChildOfClass("Sound") then
  931. Thing:FindFirstChild("Head"):FindFirstChildOfClass("Sound"):remove()
  932. end
  933. end
  934. local TORSO = Thing:FindFirstChild("Torso")
  935. if TORSO then
  936. TORSO.Anchored = false
  937. local ROOT = Thing.HumanoidRootPart
  938. local RootJoint1 = ROOT:FindFirstChild("RootJoint")
  939. local Neck1 = TORSO:FindFirstChild("Neck")
  940. local RightShoulder1 = TORSO:FindFirstChild("Right Shoulder")
  941. local LeftShoulder1 = TORSO:FindFirstChild("Left Shoulder")
  942. local RightHip1 = TORSO:FindFirstChild("Right Hip")
  943. local LeftHip1 = TORSO:FindFirstChild("Left Hip")
  944. if ROOT and RootJoint1 then
  945. local VELOCITY = (ROOT.Velocity * VT(1, 0, 1)).magnitude
  946. if VELOCITY < 1 then
  947. RootJoint1.C0 = ROOTC0 * CF(0, 0, 0 + 0.15 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(2.5 * SIN(SINE / 12)))
  948. Neck1.C0 = NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD( - 2.5 * SIN(SINE / 12)))
  949. RightShoulder1.C0 = CF(1.5, 0.5 + 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 1.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0
  950. LeftShoulder1.C0 = CF(-1.5, 0.5 + 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-5 - 1.5 * SIN(SINE / 12))) * LEFTSHOULDERC0
  951. RightHip1.C0 = CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0))
  952. LeftHip1.C0 = CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0))
  953. elseif VELOCITY > 1 then
  954. RootJoint1.C0 = ROOTC0 * CF(0, 0, 0 + 0.15 * COS(SINE / 12)) * ANGLES(RAD(25 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(2.5 * SIN(SINE / 12)))
  955. Neck1.C0 = NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(0), RAD( - 2.5 * SIN(SINE / 12)))
  956. RightShoulder1.C0 = CF(1.5, 0.5 + 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(15 + 1.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0
  957. LeftShoulder1.C0 = CF(-1.5, 0.5 + 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(-25), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(-15 - 1.5 * SIN(SINE / 12))) * LEFTSHOULDERC0
  958. RightHip1.C0 = CF(1, -1, -0.01) * ANGLES(RAD(-25-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 12)), RAD(0), RAD(0))
  959. LeftHip1.C0 = CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0))
  960. end
  961. end
  962. local Human = Thing.Humanoid
  963. if Human then
  964. Human.HipHeight = 0.3
  965. for _, c in pairs(Thing:GetChildren()) do
  966. if c.ClassName == "Part" and c.Transparency < 1 then
  967. c.Color = C3(0,0,0)
  968. c.Transparency = 0.65 + 0.15 * COS(SINE / 25)
  969. elseif c.ClassName == "Accessory" or c.ClassName == "Hat" or c.ClassName == "CharacterMesh" or c.ClassName == "Shirt" or c.ClassName == "Pants" then
  970. c:remove()
  971. end
  972. end
  973. if Human then
  974. local IDLEANIMATION = Human:LoadAnimation(ROBLOXIDLEANIMATION)
  975. IDLEANIMATION:Play()
  976. end
  977. local list = game.Workspace:children()
  978. local torso = nil
  979. local dist = 50
  980. local temp = nil
  981. local human = nil
  982. local temp2 = nil
  983. local OwnerInDanger = false
  984. for x = 1, #list do
  985. temp2 = list[x]
  986. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2 ~= Thing) then
  987. temp = temp2:findFirstChild("Torso") or temp2:findFirstChild("UpperTorso")
  988. human = temp2:findFirstChildOfClass("Humanoid")
  989. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  990. if (temp.Position - Torso.Position).magnitude < 15 then
  991. OwnerInDanger = true
  992. newdist = (temp.Position - TORSO.Position).magnitude
  993. dist = (Torso.Position - temp.Position).magnitude
  994. Human:MoveTo(temp.Position)
  995. torso = temp
  996. if newdist < 7 then
  997. torso.CFrame = CF(torso.Position,TORSO.Position)*CF(0,0,5)
  998. CreateSound(814168787, temp, 1, 2, false)
  999. ApplyDamage(human,MRANDOM(15,35),temp)
  1000. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(1,1,1), Size2 = VT(3,1,3), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position,torso.Position)*CF(0,0,-2) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  1001. WACKYEFFECT({Time = 35, EffectType = "Wave", Size = VT(1,1,1), Size2 = VT(3,1,3), Transparency = 0, Transparency2 = 1, CFrame = torso.CFrame*CF(0,-4*torso.Size.Y/2,0), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  1002. end
  1003. end
  1004. end
  1005. end
  1006. end
  1007. if OwnerInDanger == false then
  1008. for x = 1, #list do
  1009. temp2 = list[x]
  1010. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2 ~= Thing) then
  1011. temp = temp2:findFirstChild("Torso") or temp2:findFirstChild("UpperTorso")
  1012. human = temp2:findFirstChildOfClass("Humanoid")
  1013. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1014. if (temp.Position - Torso.Position).magnitude < dist then
  1015. newdist = (temp.Position - TORSO.Position).magnitude
  1016. Human:MoveTo(temp.Position)
  1017. torso = temp
  1018. if newdist < 15 then
  1019. if MRANDOM(1,35) == 1 then
  1020. CreateSound(438665935, temp, 1, 3, false)
  1021. ApplyDamage(human,MRANDOM(2,20),temp)
  1022. WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(1,1,1), Size2 = VT(3,1,3), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position,torso.Position)*CF(0,0,-2) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  1023. end
  1024. end
  1025. end
  1026. end
  1027. end
  1028. end
  1029. end
  1030. if torso == nil then
  1031. Human.WalkSpeed = Speed -0.2
  1032. if (Torso.Position - TORSO.Position).magnitude < 12 and (Torso.Position - TORSO.Position).magnitude >= 11 then
  1033. Human:MoveTo(TORSO.Position)
  1034. elseif (Torso.Position - TORSO.Position).magnitude > 15 then
  1035. Human:MoveTo(Torso.Position)
  1036. elseif (Torso.Position - TORSO.Position).magnitude < 11 then
  1037. Human:MoveTo(CF(Torso.Position,TORSO.Position)*CF(0,0,-5).p)
  1038. end
  1039. else
  1040. if OwnerInDanger == false then
  1041. Human.WalkSpeed = Speed*1.2
  1042. else
  1043. Human.WalkSpeed = Speed*5
  1044. end
  1045. end
  1046. if Human.Health == 0 then
  1047. Thing:remove()
  1048. table.remove(GHOSTS,e)
  1049. else
  1050. Human.Health = Human.Health + 0.5
  1051. end
  1052. else
  1053. Thing:remove()
  1054. table.remove(GHOSTS,e)
  1055. end
  1056. else
  1057. Thing:remove()
  1058. table.remove(GHOSTS,e)
  1059. end
  1060. end
  1061. end
  1062. end
  1063. end
  1064. refit()
  1065. end
  1066.  
  1067. --//=================================\\
  1068. --\\=================================//
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074. --//====================================================\\--
  1075. --|| END OF SCRIPT
  1076. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement