Advertisement
Toey8415

gunner

Jun 22nd, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 60.38 KB | None | 0 0
  1. ----------------------------------------------------------------- Right Arm -----------------------------------------------------------------
  2. rarm1 = Instance.new("Part", char)
  3. rarm1.Name = "Middle"
  4. rarm1.BrickColor = BrickColor.new("Really red")
  5. rarm1.Size = Vector3.new(1, 2, 1)
  6. rarm1.CanCollide = false
  7. rarm1.BottomSurface = "Smooth"
  8. rarm1.TopSurface = "Smooth"
  9. rarm1.Material = "Neon"
  10. Weld = Instance.new("Weld",rarm)
  11. Weld.Part0 = rarm
  12. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  13. Weld.Part1 = rarm1
  14. Weld.C1 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  15.  
  16. rarm2 = Instance.new("Part", char)
  17. rarm2.BrickColor = BrickColor.new("Really black")
  18. rarm2.Size = Vector3.new(1, 0.4, 1)
  19. rarm2.CanCollide = false
  20. rarm2.BottomSurface = "Smooth"
  21. rarm2.TopSurface = "Smooth"
  22. Weld = Instance.new("Weld",rarm)
  23. Weld.Part0 = rarm
  24. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  25. Weld.Part1 = rarm2
  26. Weld.C1 = CFrame.new(-0.458259583, -0.356315613, 1.50168037, 0.00366159994, 0.999978125, -0.00550877256, 0.00621323148, 0.00548594771, 0.999965668, 0.999974012, -0.00369570963, -0.00619300362)
  27.  
  28. rarm3 = Instance.new("Part", char)
  29. rarm3.BrickColor = BrickColor.new("Really black")
  30. rarm3.Size = Vector3.new(1, 0.4, 1)
  31. rarm3.CanCollide = false
  32. rarm3.BottomSurface = "Smooth"
  33. rarm3.TopSurface = "Smooth"
  34. Weld = Instance.new("Weld",rarm)
  35. Weld.Part0 = rarm
  36. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  37. Weld.Part1 = rarm3
  38. Weld.C1 = CFrame.new(-1.50168133, -0.768137932, -0.00367927551, -0.999974012, 0.00369570986, 0.00619304739, 0.00366159948, 0.999978125, -0.00550886011, -0.00621327572, -0.00548603525, -0.999965668)
  39.  
  40. rarm4 = Instance.new("Part", char)
  41. rarm4.BrickColor = BrickColor.new("Really black")
  42. rarm4.Size = Vector3.new(1, 0.4, 1)
  43. rarm4.CanCollide = false
  44. rarm4.BottomSurface = "Smooth"
  45. rarm4.TopSurface = "Smooth"
  46. Weld = Instance.new("Weld",rarm)
  47. Weld.Part0 = rarm
  48. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  49. Weld.Part1 = rarm4
  50. Weld.C1 = CFrame.new(-0.00368309021, 1.8716774, 0.458146095, -0.00621323194, -0.00548603525, -0.999965668, 0.999974012, -0.0036957534, -0.00619300315, -0.00366164325, -0.999978125, 0.00550886057)
  51.  
  52. rarm5 = Instance.new("Part", char)
  53. rarm5.BrickColor = BrickColor.new("Really black")
  54. rarm5.Size = Vector3.new(1, 0.4, 1)
  55. rarm5.CanCollide = false
  56. rarm5.BottomSurface = "Smooth"
  57. rarm5.TopSurface = "Smooth"
  58. Mesh = Instance.new("SpecialMesh", rarm5)
  59. Mesh.MeshType = "Brick"
  60. Mesh.Scale = Vector3.new(1.1, 1.1, 1.1)
  61. Weld = Instance.new("Weld",rarm)
  62. Weld.Part0 = rarm
  63. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  64. Weld.Part1 = rarm5
  65. Weld.C1 = CFrame.new(0.00368118286, 0.841855764, -1.50168228, 0.00621323194, 0.00548603525, 0.999965668, 0.00366159948, 0.999978125, -0.00550886011, -0.999974012, 0.00369570963, 0.00619300362)
  66.  
  67. rarm6 = Instance.new("Part", char)
  68. rarm6.BrickColor = BrickColor.new("Really black")
  69. rarm6.Size = Vector3.new(1, 0.4, 1)
  70. rarm6.CanCollide = false
  71. rarm6.BottomSurface = "Smooth"
  72. rarm6.TopSurface = "Smooth"
  73. Weld = Instance.new("Weld",rarm)
  74. Weld.Part0 = rarm
  75. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  76. Weld.Part1 = rarm6
  77. Weld.C1 = CFrame.new(-1.50168133, -0.403675079, 0.458138466, -0.999974012, 0.00369575364, 0.00619304692, -0.00621327572, -0.00548603525, -0.999965668, -0.00366164325, -0.999978125, 0.00550886057)
  78.  
  79. rarm7 = Instance.new("Part", char)
  80. rarm7.BrickColor = BrickColor.new("Really red")
  81. rarm7.Size = Vector3.new(0.5, 0.3, 2)
  82. rarm7.CanCollide = false
  83. rarm7.BottomSurface = "Smooth"
  84. rarm7.TopSurface = "Smooth"
  85. rarm7.Material = "Neon"
  86. Weld = Instance.new("Weld",rarm)
  87. Weld.Part0 = rarm
  88. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  89. Weld.Part1 = rarm7
  90. Weld.C1 = CFrame.new(0.344418526, -1.80139351, -1.50391006, 0.122256897, -0.48818168, -0.864136577, -0.966848493, -0.25524351, 0.00740774209, -0.224181563, 0.834583461, -0.503202915)
  91.  
  92. rarm8 = Instance.new("Part", char)
  93. rarm8.BrickColor = BrickColor.new("Really red")
  94. rarm8.Size = Vector3.new(1, 0.4, 1)
  95. rarm8.CanCollide = false
  96. rarm8.BottomSurface = "Smooth"
  97. rarm8.TopSurface = "Smooth"
  98. Weld = Instance.new("Weld",rarm)
  99. Weld.Part0 = rarm
  100. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  101. Weld.Part1 = rarm8
  102. Weld.C1 = CFrame.new(0.241888285, -0.00366973877, -1.56167889, 0.00366144883, 0.999978125, -0.00550877163, -0.00621323148, -0.00548594771, -0.999965668, -0.999974012, 0.00369555852, 0.00619300455)
  103.  
  104. Player = game.Players.LocalPlayer
  105. Character = Player.Character
  106. local txt = Instance.new("BillboardGui", Character)
  107. txt.Adornee = Character.Head
  108. txt.Name = "_status"
  109. txt.Size = UDim2.new(2, 0, 1.2, 0)
  110. txt.StudsOffset = Vector3.new(-9, 8, 0)
  111. local text = Instance.new("TextLabel", txt)
  112. text.Size = UDim2.new(10, 0, 7, 0)
  113. text.FontSize = "Size24"
  114. text.TextScaled = true
  115. text.TextTransparency = 0
  116. text.BackgroundTransparency = 1
  117. text.TextTransparency = 0
  118. text.TextStrokeTransparency = 0
  119. text.Font = "Antique"
  120. text.TextStrokeColor3 = Color3.new(170,0,0)
  121. text.Text = "Toey The Gunner"
  122.  
  123.  
  124. --//====================================================\\--
  125. --| CREATED BY SHACKLUSTER
  126. --\\====================================================//--
  127.  
  128. wait(0.2)
  129.  
  130. Player = game:GetService("Players").LocalPlayer
  131. PlayerGui = Player.PlayerGui
  132. Cam = workspace.CurrentCamera
  133. Backpack = Player.Backpack
  134. Character = Player.Character
  135. Humanoid = Character.Humanoid
  136. Mouse = Player:GetMouse()
  137. RootPart = Character["HumanoidRootPart"]
  138. Torso = Character["Torso"]
  139. Head = Character["Head"]
  140. RightArm = Character["Right Arm"]
  141. LeftArm = Character["Left Arm"]
  142. RightLeg = Character["Right Leg"]
  143. LeftLeg = Character["Left Leg"]
  144. RootJoint = RootPart["RootJoint"]
  145. Neck = Torso["Neck"]
  146. RightShoulder = Torso["Right Shoulder"]
  147. LeftShoulder = Torso["Left Shoulder"]
  148. RightHip = Torso["Right Hip"]
  149. LeftHip = Torso["Left Hip"]
  150. SIZE = 1
  151.  
  152. IT = Instance.new
  153. CF = CFrame.new
  154. VT = Vector3.new
  155. RAD = math.rad
  156. C3 = Color3.new
  157. UD2 = UDim2.new
  158. BRICKC = BrickColor.new
  159. ANGLES = CFrame.Angles
  160. EULER = CFrame.fromEulerAnglesXYZ
  161. COS = math.cos
  162. ACOS = math.acos
  163. SIN = math.sin
  164. ASIN = math.asin
  165. ABS = math.abs
  166. MRANDOM = math.random
  167. FLOOR = math.floor
  168.  
  169. --//=================================\\
  170. --|| USEFUL VALUES
  171. --\\=================================//
  172.  
  173. Animation_Speed = 3
  174. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  175. local Speed = 10
  176. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  177. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  178. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  179. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  180. local DAMAGEMULTIPLIER = 1
  181. local ANIM = "Idle"
  182. local ATTACK = false
  183. local EQUIPPED = false
  184. local HOLD = false
  185. local COMBO = 1
  186. local Rooted = false
  187. local SINE = 0
  188. local KEYHOLD = false
  189. local CHANGE = 2 / Animation_Speed
  190. local WALKINGANIM = false
  191. local VALUE1 = false
  192. local VALUE2 = false
  193. local ROBLOXIDLEANIMATION = IT("Animation")
  194. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  195. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  196. --ROBLOXIDLEANIMATION.Parent = Humanoid
  197. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  198. WEAPONGUI.Name = "Weapon GUI"
  199. local ANIMATOR = Humanoid.Animator
  200. local ANIMATE = Character.Animate
  201. local UNANCHOR = true
  202. local GHOSTS = {}
  203. ANIMATE:remove()
  204. Character.Archivable = true
  205. script.Parent = WEAPONGUI
  206. local GHOSTBASE = Character:Clone()
  207. GHOSTBASE.Parent = nil
  208. GHOSTBASE.Name = "Ghost"
  209. for _, c in pairs(GHOSTBASE:GetChildren()) do
  210. if c.ClassName == "Part" and c.Transparency < 1 then
  211. c.Color = C3(0,0,0)
  212. if c.ClassName == "Accessory" or c.ClassName == "Hat" or c.ClassName == "CharacterMesh" or c.ClassName == "Shirt" or c.ClassName == "Pants" then
  213. c:remove()
  214. end
  215. end
  216. end
  217. local sick = Instance.new("Sound",Torso)
  218. sick.SoundId = "rbxassetid://442264080"
  219. sick.Looped = true
  220. sick.Pitch = 1
  221. sick.Volume = 3
  222. sick:Play()
  223. local Effects = IT("Folder", Character)
  224. Effects.Name = "Effects"
  225. Character.Archivable = false
  226.  
  227. --//=================================\\
  228. --\\=================================//
  229.  
  230. local face = Head:FindFirstChild'face'
  231. if(not face)then
  232. NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://1281412824"})
  233. else
  234. face.Texture = "rbxassetid://1281412824"
  235. end
  236.  
  237. --//=================================\\
  238. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  239. --\\=================================//
  240.  
  241. ArtificialHB = Instance.new("BindableEvent", script)
  242. ArtificialHB.Name = "ArtificialHB"
  243.  
  244. script:WaitForChild("ArtificialHB")
  245.  
  246. frame = Frame_Speed
  247. tf = 0
  248. allowframeloss = false
  249. tossremainder = false
  250. lastframe = tick()
  251. script.ArtificialHB:Fire()
  252.  
  253. game:GetService("RunService").Heartbeat:connect(function(s, p)
  254. tf = tf + s
  255. if tf >= frame then
  256. if allowframeloss then
  257. script.ArtificialHB:Fire()
  258. lastframe = tick()
  259. else
  260. for i = 1, math.floor(tf / frame) do
  261. script.ArtificialHB:Fire()
  262. end
  263. lastframe = tick()
  264. end
  265. if tossremainder then
  266. tf = 0
  267. else
  268. tf = tf - frame * math.floor(tf / frame)
  269. end
  270. end
  271. end)
  272.  
  273. --//=================================\\
  274. --\\=================================//
  275.  
  276. --//=================================\\
  277. --|| SOME FUNCTIONS
  278. --\\=================================//
  279.  
  280. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  281. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  282. end
  283.  
  284. function PositiveAngle(NUMBER)
  285. if NUMBER >= 0 then
  286. NUMBER = 0
  287. end
  288. return NUMBER
  289. end
  290.  
  291. function NegativeAngle(NUMBER)
  292. if NUMBER <= 0 then
  293. NUMBER = 0
  294. end
  295. return NUMBER
  296. end
  297.  
  298. function Swait(NUMBER)
  299. if NUMBER == 0 or NUMBER == nil then
  300. ArtificialHB.Event:wait()
  301. else
  302. for i = 1, NUMBER do
  303. ArtificialHB.Event:wait()
  304. end
  305. end
  306. end
  307.  
  308. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  309. local NEWMESH = IT(MESH)
  310. if MESH == "SpecialMesh" then
  311. NEWMESH.MeshType = MESHTYPE
  312. if MESHID ~= "nil" and MESHID ~= "" then
  313. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  314. end
  315. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  316. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  317. end
  318. end
  319. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  320. NEWMESH.Scale = SCALE
  321. NEWMESH.Parent = PARENT
  322. return NEWMESH
  323. end
  324.  
  325. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  326. local NEWPART = IT("Part")
  327. NEWPART.formFactor = FORMFACTOR
  328. NEWPART.Reflectance = REFLECTANCE
  329. NEWPART.Transparency = TRANSPARENCY
  330. NEWPART.CanCollide = false
  331. NEWPART.Locked = true
  332. NEWPART.Anchored = true
  333. if ANCHOR == false then
  334. NEWPART.Anchored = false
  335. end
  336. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  337. NEWPART.Name = NAME
  338. NEWPART.Size = SIZE
  339. NEWPART.Position = Torso.Position
  340. NEWPART.Material = MATERIAL
  341. NEWPART:BreakJoints()
  342. NEWPART.Parent = PARENT
  343. return NEWPART
  344. end
  345.  
  346. local function weldBetween(a, b)
  347. local weldd = Instance.new("ManualWeld")
  348. weldd.Part0 = a
  349. weldd.Part1 = b
  350. weldd.C0 = CFrame.new()
  351. weldd.C1 = b.CFrame:inverse() * a.CFrame
  352. weldd.Parent = a
  353. return weldd
  354. end
  355.  
  356.  
  357. function QuaternionFromCFrame(cf)
  358. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  359. local trace = m00 + m11 + m22
  360. if trace > 0 then
  361. local s = math.sqrt(1 + trace)
  362. local recip = 0.5 / s
  363. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  364. else
  365. local i = 0
  366. if m11 > m00 then
  367. i = 1
  368. end
  369. if m22 > (i == 0 and m00 or m11) then
  370. i = 2
  371. end
  372. if i == 0 then
  373. local s = math.sqrt(m00 - m11 - m22 + 1)
  374. local recip = 0.5 / s
  375. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  376. elseif i == 1 then
  377. local s = math.sqrt(m11 - m22 - m00 + 1)
  378. local recip = 0.5 / s
  379. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  380. elseif i == 2 then
  381. local s = math.sqrt(m22 - m00 - m11 + 1)
  382. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  383. end
  384. end
  385. end
  386.  
  387. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  388. local xs, ys, zs = x + x, y + y, z + z
  389. local wx, wy, wz = w * xs, w * ys, w * zs
  390. local xx = x * xs
  391. local xy = x * ys
  392. local xz = x * zs
  393. local yy = y * ys
  394. local yz = y * zs
  395. local zz = z * zs
  396. 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))
  397. end
  398.  
  399. function QuaternionSlerp(a, b, t)
  400. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  401. local startInterp, finishInterp;
  402. if cosTheta >= 0.0001 then
  403. if (1 - cosTheta) > 0.0001 then
  404. local theta = ACOS(cosTheta)
  405. local invSinTheta = 1 / SIN(theta)
  406. startInterp = SIN((1 - t) * theta) * invSinTheta
  407. finishInterp = SIN(t * theta) * invSinTheta
  408. else
  409. startInterp = 1 - t
  410. finishInterp = t
  411. end
  412. else
  413. if (1 + cosTheta) > 0.0001 then
  414. local theta = ACOS(-cosTheta)
  415. local invSinTheta = 1 / SIN(theta)
  416. startInterp = SIN((t - 1) * theta) * invSinTheta
  417. finishInterp = SIN(t * theta) * invSinTheta
  418. else
  419. startInterp = t - 1
  420. finishInterp = t
  421. end
  422. end
  423. 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
  424. end
  425.  
  426. function Clerp(a, b, t)
  427. local qa = {QuaternionFromCFrame(a)}
  428. local qb = {QuaternionFromCFrame(b)}
  429. local ax, ay, az = a.x, a.y, a.z
  430. local bx, by, bz = b.x, b.y, b.z
  431. local _t = 1 - t
  432. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  433. end
  434.  
  435. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  436. local frame = IT("Frame")
  437. frame.BackgroundTransparency = TRANSPARENCY
  438. frame.BorderSizePixel = BORDERSIZEPIXEL
  439. frame.Position = POSITION
  440. frame.Size = SIZE
  441. frame.BackgroundColor3 = COLOR
  442. frame.BorderColor3 = BORDERCOLOR
  443. frame.Name = NAME
  444. frame.Parent = PARENT
  445. return frame
  446. end
  447.  
  448. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  449. local label = IT("TextLabel")
  450. label.BackgroundTransparency = 1
  451. label.Size = UD2(1, 0, 1, 0)
  452. label.Position = UD2(0, 0, 0, 0)
  453. label.TextColor3 = TEXTCOLOR
  454. label.TextStrokeTransparency = STROKETRANSPARENCY
  455. label.TextTransparency = TRANSPARENCY
  456. label.FontSize = TEXTFONTSIZE
  457. label.Font = TEXTFONT
  458. label.BorderSizePixel = BORDERSIZEPIXEL
  459. label.TextScaled = false
  460. label.Text = TEXT
  461. label.Name = NAME
  462. label.Parent = PARENT
  463. return label
  464. end
  465.  
  466. function NoOutlines(PART)
  467. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  468. end
  469.  
  470. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  471. local NEWWELD = IT(TYPE)
  472. NEWWELD.Part0 = PART0
  473. NEWWELD.Part1 = PART1
  474. NEWWELD.C0 = C0
  475. NEWWELD.C1 = C1
  476. NEWWELD.Parent = PARENT
  477. return NEWWELD
  478. end
  479.  
  480. local S = IT("Sound")
  481. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  482. local NEWSOUND = nil
  483. coroutine.resume(coroutine.create(function()
  484. NEWSOUND = S:Clone()
  485. NEWSOUND.Parent = PARENT
  486. NEWSOUND.Volume = VOLUME
  487. NEWSOUND.Pitch = PITCH
  488. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  489. NEWSOUND:play()
  490. if DOESLOOP == true then
  491. NEWSOUND.Looped = true
  492. else
  493. repeat wait(1) until NEWSOUND.Playing == false
  494. NEWSOUND:remove()
  495. end
  496. end))
  497. return NEWSOUND
  498. end
  499.  
  500. function CFrameFromTopBack(at, top, back)
  501. local right = top:Cross(back)
  502. 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)
  503. end
  504.  
  505. --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})
  506. function WACKYEFFECT(Table)
  507. local TYPE = (Table.EffectType or "Sphere")
  508. local SIZE = (Table.Size or VT(1,1,1))
  509. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  510. local TRANSPARENCY = (Table.Transparency or 0)
  511. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  512. local CFRAME = (Table.CFrame or Torso.CFrame)
  513. local MOVEDIRECTION = (Table.MoveToPos or nil)
  514. local ROTATION1 = (Table.RotationX or 0)
  515. local ROTATION2 = (Table.RotationY or 0)
  516. local ROTATION3 = (Table.RotationZ or 0)
  517. local MATERIAL = (Table.Material or "Neon")
  518. local COLOR = (Table.Color or C3(1,1,1))
  519. local TIME = (Table.Time or 45)
  520. local SOUNDID = (Table.SoundID or nil)
  521. local SOUNDPITCH = (Table.SoundPitch or nil)
  522. local SOUNDVOLUME = (Table.SoundVolume or nil)
  523. coroutine.resume(coroutine.create(function()
  524. local PLAYSSOUND = false
  525. local SOUND = nil
  526. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  527. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  528. PLAYSSOUND = true
  529. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  530. end
  531. EFFECT.Color = COLOR
  532. local MSH = nil
  533. if TYPE == "Sphere" then
  534. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  535. elseif TYPE == "Block" then
  536. MSH = IT("BlockMesh",EFFECT)
  537. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  538. elseif TYPE == "Wave" then
  539. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  540. elseif TYPE == "Ring" then
  541. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  542. elseif TYPE == "Slash" then
  543. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  544. elseif TYPE == "Round Slash" then
  545. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  546. elseif TYPE == "Swirl" then
  547. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  548. elseif TYPE == "Skull" then
  549. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  550. elseif TYPE == "Crystal" then
  551. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  552. end
  553. if MSH ~= nil then
  554. local MOVESPEED = nil
  555. if MOVEDIRECTION ~= nil then
  556. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  557. end
  558. local GROWTH = SIZE - ENDSIZE
  559. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  560. if TYPE == "Block" then
  561. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  562. else
  563. EFFECT.CFrame = CFRAME
  564. end
  565. for LOOP = 1, TIME+1 do
  566. Swait()
  567. MSH.Scale = MSH.Scale - GROWTH/TIME
  568. if TYPE == "Wave" then
  569. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  570. end
  571. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  572. if TYPE == "Block" then
  573. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  574. else
  575. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  576. end
  577. if MOVEDIRECTION ~= nil then
  578. local ORI = EFFECT.Orientation
  579. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  580. EFFECT.Orientation = ORI
  581. end
  582. end
  583. if PLAYSSOUND == false then
  584. EFFECT:remove()
  585. else
  586. SOUND.Stopped:Connect(function()
  587. EFFECT:remove()
  588. end)
  589. end
  590. else
  591. if PLAYSSOUND == false then
  592. EFFECT:remove()
  593. else
  594. repeat Swait() until SOUND.Playing == false
  595. EFFECT:remove()
  596. end
  597. end
  598. end))
  599. end
  600.  
  601. function MakeForm(PART,TYPE)
  602. if TYPE == "Cyl" then
  603. local MSH = IT("CylinderMesh",PART)
  604. elseif TYPE == "Ball" then
  605. local MSH = IT("SpecialMesh",PART)
  606. MSH.MeshType = "Sphere"
  607. elseif TYPE == "Wedge" then
  608. local MSH = IT("SpecialMesh",PART)
  609. MSH.MeshType = "Wedge"
  610. end
  611. end
  612.  
  613. Debris = game:GetService("Debris")
  614.  
  615. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  616. local DIRECTION = CF(StartPos,EndPos).lookVector
  617. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  618. end
  619.  
  620. function turnto(position)
  621. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  622. end
  623.  
  624. function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
  625. if FLOOR ~= nil then
  626. coroutine.resume(coroutine.create(function()
  627. local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
  628. PART.CFrame = CF(POSITION)
  629. for i = 1, 45 do
  630. local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
  631. RingPiece.Material = FLOOR.Material
  632. RingPiece.Color = FLOOR.Color
  633. 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)))
  634. Debris:AddItem(RingPiece,SWAIT)
  635. end
  636. PART:remove()
  637. end))
  638. end
  639. end
  640.  
  641. function CreateFlyingDebree(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH,DOES360)
  642. if FLOOR ~= nil then
  643. for i = 1, AMOUNT do
  644. local DEBREE = CreatePart(3, Effects, "Neon", 0, 0, "Peal", "Debree", BLOCKSIZE, false)
  645. DEBREE.Material = FLOOR.Material
  646. DEBREE.Color = FLOOR.Color
  647. DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  648. if DOES360 == true then
  649. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH))
  650. else
  651. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),STRENGTH,MRANDOM(-STRENGTH,STRENGTH))
  652. end
  653. coroutine.resume(coroutine.create(function()
  654. Swait(15)
  655. DEBREE.Parent = workspace
  656. DEBREE.CanCollide = true
  657. Debris:AddItem(DEBREE,SWAIT)
  658. end))
  659. end
  660. end
  661. end
  662.  
  663. function SpawnTrail(FROM,TO)
  664. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Pearl", "Arrow", VT(0,0,0))
  665. MakeForm(TRAIL,"Cyl")
  666. local DIST = (FROM - TO).Magnitude
  667. TRAIL.Size = VT(0.1,DIST,0.1)
  668. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  669. coroutine.resume(coroutine.create(function()
  670. for i = 1, 5 do
  671. Swait()
  672. TRAIL.Transparency = TRAIL.Transparency + 0.1
  673. end
  674. TRAIL:remove()
  675. end))
  676. end
  677.  
  678. local Decal = IT("Decal")
  679. function SpawnBulletHole(POSITION)
  680. local O1 = CreatePart(3, Effects, "Neon", 0, 1, "Really red", "Bullet hole", VT(0.2,0,0.2))
  681. local decal = Decal:Clone()
  682. decal.Parent = O1
  683. decal.Face = "Top"
  684. decal.Texture = "http://www.roblox.com/asset/?id=130624105"
  685. local decal2 = Decal:Clone()
  686. decal2.Parent = O1
  687. decal2.Face = "Bottom"
  688. decal2.Texture = "http://www.roblox.com/asset/?id=130624105"
  689. O1.CFrame = POSITION*ANGLES(RAD(0),RAD(MRANDOM(-180,180)),RAD(0))
  690. Debris:AddItem(O1,5)
  691. end
  692.  
  693. local asd = Instance.new("ParticleEmitter")
  694. asd.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(.5, 0, 0))
  695. asd.LightEmission = .1
  696. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  697. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 2)})
  698. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  699. asd.Transparency = bbb
  700. asd.Size = aaa
  701. asd.ZOffset = .9
  702. asd.Acceleration = Vector3.new(0, -15, 0)
  703. asd.LockedToPart = false
  704. asd.EmissionDirection = "Back"
  705. asd.Lifetime = NumberRange.new(1, 2)
  706. asd.Rotation = NumberRange.new(-100, 100)
  707. asd.RotSpeed = NumberRange.new(-100, 100)
  708. asd.Speed = NumberRange.new(10)
  709. asd.Enabled = false
  710. asd.VelocitySpread = 999
  711.  
  712. function getbloody(victim,amount)
  713. local PART = IT("Part",Effects)
  714. PART.Transparency = 1
  715. PART.Size = victim.Size
  716. PART.Anchored = true
  717. PART.CanCollide = false
  718. PART.CFrame = CF(victim.Position)
  719. local HITPLAYERSOUNDS = {"356551938","264486467"}
  720. Debris:AddItem(PART,5)
  721. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  722. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  723. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  724. local prtcl = asd:Clone()
  725. prtcl.Parent = PART
  726. prtcl:Emit(amount*10)
  727. end
  728.  
  729. function BulletDetection(FROM,TO)
  730. local AIMHIT,AIMPOS,NORMAL = CastProperRay(FROM,TO,2000,Character)
  731. coroutine.resume(coroutine.create(function()
  732. if AIMHIT ~= nil then
  733. if AIMHIT.Parent ~= Character then
  734. if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") or AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  735. if AIMHIT.Name ~= "Head" and AIMHIT.Parent.ClassName ~= "Accessory" then
  736. ApplyDamage(AIMHIT.Parent:FindFirstChildOfClass("Humanoid"),MRANDOM(15,25),AIMHIT)
  737. elseif AIMHIT.Name == "Head" or AIMHIT.Parent.ClassName == "Accessory" then
  738. if AIMHIT.Parent.ClassName == "Accessory" then
  739. if AIMHIT:FindFirstChild("HatAttachment") or AIMHIT:FindFirstChild("FaceFrontAttachment") or AIMHIT:FindFirstChild("HairAttachment") then
  740. AIMHIT.Parent.Parent:BreakJoints()
  741. if AIMHIT.Parent.Parent:FindFirstChild("Head") then
  742. getbloody(AIMHIT.Parent.Parent.Head,15)
  743. AIMHIT.Parent.Parent.Head:remove()
  744. StatLabel(AIMHIT.CFrame * CF(0, 0 + (AIMHIT.Size.z - 1), 0), "Headshot!", C3(1,0,0))
  745. end
  746. else
  747. ApplyDamage(AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid"),MRANDOM(25,65),AIMHIT)
  748. end
  749. elseif AIMHIT.Name == "Head" then
  750. getbloody(AIMHIT,15)
  751. AIMHIT.Parent:BreakJoints()
  752. AIMHIT:remove()
  753. StatLabel(AIMHIT.CFrame * CF(0, 0 + (AIMHIT.Size.z - 1), 0), "Headshot!", C3(1,0,0))
  754. end
  755. end
  756. else
  757. CreateFlyingDebree(AIMHIT,CF(AIMPOS),7,VT(0.1,0.1,0.1),5,35,true)
  758. SpawnBulletHole(CF(AIMPOS,AIMPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0)))
  759. end
  760. end
  761. end
  762. end))
  763. return AIMHIT,AIMPOS,NORMAL
  764. end
  765.  
  766. --//=================================\\
  767. --|| WEAPON CREATION
  768. --\\=================================//
  769.  
  770. for i = 1, 35 do
  771. local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/35.2, "Dark stone grey", "FaceGradient", VT(1.01,0.5,1.01),false)
  772. FACE.Color = C3(0,0,0)
  773. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  774. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  775. end
  776. local EYE = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
  777. MakeForm(EYE,"Ball")
  778. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.26,-0.55), CF(0, 0, 0))
  779. local EYE2 = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
  780. MakeForm(EYE2,"Ball")
  781. CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE2, CF(-0.15,0.26,-0.55), CF(0, 0, 0))
  782. local Gun = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Royal purple", "Gun", VT(0, 0, 0),false)
  783. local HandleMesh = CreateMesh("SpecialMesh", Gun, "FileMesh", "468351345", "468351348", VT(0.06,0.06,0.06), VT(0,0, 0))
  784. local Weld = CreateWeldOrSnapOrMotor("Weld", Gun, RightArm, Gun, CF(0, -1.8, -0.2) * ANGLES(RAD(0), RAD(90), RAD(-90)), CF(0, 0, 0))
  785.  
  786. local BODY = {}
  787.  
  788. for _, c in pairs(Character:GetDescendants()) do
  789. if c:IsA("BasePart") and c.Name ~= "Handle" then
  790. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  791. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  792. end
  793. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  794. elseif c:IsA("JointInstance") then
  795. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  796. end
  797. end
  798.  
  799. for e = 1, #BODY do
  800. if BODY[e] ~= nil then
  801. local STUFF = BODY[e]
  802. local PART = STUFF[1]
  803. local PARENT = STUFF[2]
  804. local MATERIAL = STUFF[3]
  805. local COLOR = STUFF[4]
  806. local TRANSPARENCY = STUFF[5]
  807. if PART.ClassName == "Part" and PART ~= RootPart then
  808. PART.Material = MATERIAL
  809. PART.Color = COLOR
  810. PART.Transparency = TRANSPARENCY
  811. end
  812. PART.AncestryChanged:Connect(function()
  813. PART.Parent = PARENT
  814. end)
  815. end
  816. end
  817.  
  818. function refit()
  819. Character.Parent = workspace
  820. for e = 1, #BODY do
  821. if BODY[e] ~= nil then
  822. local STUFF = BODY[e]
  823. local PART = STUFF[1]
  824. local PARENT = STUFF[2]
  825. local MATERIAL = STUFF[3]
  826. local COLOR = STUFF[4]
  827. local TRANSPARENCY = STUFF[5]
  828. if PART.ClassName == "Part" and PART ~= RootPart then
  829. PART.Material = MATERIAL
  830. PART.Color = COLOR
  831. PART.Transparency = TRANSPARENCY
  832. end
  833. if PART.Parent ~= PARENT then
  834. Humanoid:remove()
  835. PART.Parent = PARENT
  836. Humanoid = IT("Humanoid",Character)
  837. end
  838. end
  839. end
  840. end
  841.  
  842. local SKILLTEXTCOLOR = C3(0,0,0)
  843. local SKILLFONT = "SciFi"
  844. local SKILLTEXTSIZE = 7
  845.  
  846. Humanoid.Died:connect(function()
  847. refit()
  848. end)
  849.  
  850. function Blink()
  851. coroutine.resume(coroutine.create(function()
  852. if EYE ~= nil then
  853. for i = 1, 5 do
  854. Swait()
  855. EYE.Mesh.Scale = EYE.Mesh.Scale - VT(0,0.2,0)
  856. EYE2.Mesh.Scale = EYE.Mesh.Scale
  857. end
  858. for i = 1, 7 do
  859. Swait()
  860. EYE.Mesh.Scale = EYE.Mesh.Scale + VT(0,0.2,0)
  861. EYE2.Mesh.Scale = EYE.Mesh.Scale
  862. end
  863. EYE.Mesh.Scale = VT(1,1,1)
  864. EYE2.Mesh.Scale = EYE.Mesh.Scale
  865. end
  866. end))
  867. end
  868.  
  869. 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")
  870. 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")
  871. 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")
  872. 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")
  873.  
  874. local SKILL3TEXT = CreateLabel(SKILL1FRAME, "[Z] Shell", C3(0,0,0), 7, SKILLFONT, 0, 2, 1, "Text 3")
  875. local SKILL4TEXT = CreateLabel(SKILL2FRAME, "[X] Sinful Shell", C3(1,0,0), 8, "Antique", 0, 2, 1, "Text 4")
  876.  
  877. local AMMOIMAGE1 = IT("ImageLabel",AMMO1FRAME)
  878. AMMOIMAGE1.Size = UD2(1,0,1,0)
  879. AMMOIMAGE1.BackgroundTransparency = 1
  880. AMMOIMAGE1.BorderSizePixel = 0
  881. AMMOIMAGE1.Image = "http://www.roblox.com/asset/?id=1493961907"
  882. local AMMOIMAGE2 = IT("ImageLabel",AMMO2FRAME)
  883. AMMOIMAGE2.Size = UD2(1,0,1,0)
  884. AMMOIMAGE2.BackgroundTransparency = 1
  885. AMMOIMAGE2.BorderSizePixel = 0
  886. AMMOIMAGE2.Image = "http://www.roblox.com/asset/?id=1493962162"
  887.  
  888. --//=================================\\
  889. --|| DAMAGE FUNCTIONS
  890. --\\=================================//
  891.  
  892. function StatLabel(CFRAME, TEXT, COLOR)
  893. local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
  894. STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
  895. local BODYGYRO = IT("BodyGyro", STATPART)
  896. game:GetService("Debris"):AddItem(STATPART ,5)
  897. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  898. BILLBOARDGUI.Adornee = STATPART
  899. BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
  900. BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
  901. BILLBOARDGUI.AlwaysOnTop = false
  902. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  903. TEXTLABEL.BackgroundTransparency = 1
  904. TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
  905. TEXTLABEL.Text = TEXT
  906. TEXTLABEL.Font = SKILLFONT
  907. TEXTLABEL.FontSize="Size42"
  908. TEXTLABEL.TextColor3 = COLOR
  909. TEXTLABEL.TextStrokeTransparency = 0
  910. TEXTLABEL.TextScaled = true
  911. TEXTLABEL.TextWrapped = true
  912. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  913. for i = 1, 10 do
  914. Swait()
  915. STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
  916. TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/10)
  917. TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
  918. end
  919. THEPART.Parent = nil
  920. end),STATPART, TEXTLABEL)
  921. end
  922.  
  923. --//=================================\\
  924. --|| DAMAGING
  925. --\\=================================//
  926.  
  927. function ApplyDamage(Humanoid,Damage,TorsoPart)
  928. local defence = Instance.new("BoolValue",Humanoid.Parent)
  929. defence.Name = ("HitBy"..Player.Name)
  930. game:GetService("Debris"):AddItem(defence, 0.001)
  931. Damage = Damage * DAMAGEMULTIPLIER
  932. if Humanoid.Health ~= 0 then
  933. local CritChance = MRANDOM(1,100)
  934. if Damage > Humanoid.Health then
  935. Damage = math.ceil(Humanoid.Health)
  936. if Damage == 0 then
  937. Damage = 0.1
  938. end
  939. end
  940. Humanoid.Health = Humanoid.Health - Damage
  941. StatLabel(TorsoPart.CFrame * CF(0, 0 + (TorsoPart.Size.z - 1), 0), Damage, C3(0, 0, 0))
  942. end
  943. end
  944.  
  945. function Ghostify(POSITION,RANGE)
  946. local CHILDREN = workspace:GetDescendants()
  947. for index, CHILD in pairs(CHILDREN) do
  948. if CHILD.ClassName == "Model" and CHILD ~= Character and CHILD.Parent ~= Effects then
  949. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  950. if HUM then
  951. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  952. if TORSO then
  953. if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
  954. local GHOST = GHOSTBASE:Clone()
  955. GHOST.Parent = Effects
  956. GHOST.Torso.CFrame = TORSO.CFrame
  957. table.insert(GHOSTS,GHOST)
  958. CHILD:remove()
  959. end
  960. end
  961. end
  962. end
  963. end
  964. end
  965.  
  966. --//=================================\\
  967. --|| ATTACK FUNCTIONS AND STUFF
  968. --\\=================================//
  969.  
  970. function Shell()
  971. ATTACK = true
  972. Rooted = false
  973. local GYRO = IT("BodyGyro",RootPart)
  974. GYRO.D = 750
  975. GYRO.P = 20000
  976. GYRO.MaxTorque = VT(0,40000000,0)
  977. for i=0, 1, 0.1 / Animation_Speed do
  978. Swait()
  979. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  980. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  981. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(15), RAD(-35)), 0.75 / Animation_Speed)
  982. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0) * ANGLES(RAD(115), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  983. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  984. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  985. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.3 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(5), RAD(0), RAD(-25)), 0.75 / Animation_Speed)
  986. end
  987. GYRO:remove()
  988. CreateSound(696483710, Gun, 5, 1, false)
  989. local AIMHIT,AIMPOS,NORMAL = BulletDetection(Gun.Position,Mouse.Hit.p)
  990. SpawnTrail(Gun.CFrame*CF(1.5,0.5,0).p,AIMPOS)
  991. WACKYEFFECT({Time = 3, EffectType = "Sphere", Size = VT(1,0.3,0.3), Size2 = VT(1,0,0), Transparency = 0, Transparency2 = 1, CFrame = Gun.CFrame*CF(1.5,0.5,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  992. for i=0, 0.3, 0.1 / Animation_Speed do
  993. Swait()
  994. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  995. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(15), RAD(-35)), 0.75 / Animation_Speed)
  996. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0.3) * ANGLES(RAD(110), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  997. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  998. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  999. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.3 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(5), RAD(0), RAD(-25)), 0.75 / Animation_Speed)
  1000. end
  1001. ATTACK = false
  1002. Rooted = false
  1003. end
  1004.  
  1005. function Taunt()
  1006. ATTACK = true
  1007. local LAUGH = nil
  1008. coroutine.resume(coroutine.create(function()
  1009. repeat
  1010. Swait()
  1011. 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)
  1012. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.1*SIZE) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-45)), 1 / Animation_Speed)
  1013. 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)
  1014. 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)
  1015. 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)
  1016. 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)
  1017. until LAUGH ~= nil
  1018. repeat
  1019. Swait()
  1020. LAUGH.Parent = Head
  1021. 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)
  1022. 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)
  1023. 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)
  1024. 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)
  1025. 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)
  1026. 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)
  1027. until LAUGH.Playing == false
  1028. ATTACK = false
  1029. end))
  1030. wait(0.1)
  1031. sick:Stop()
  1032. LAUGH = CreateSound(254826701, Head, 10, 1, false)
  1033. sick:Resume()
  1034. end
  1035.  
  1036. function SinfulShell()
  1037. ATTACK = true
  1038. Rooted = false
  1039. local GYRO = IT("BodyGyro",RootPart)
  1040. GYRO.D = 750
  1041. GYRO.P = 20000
  1042. GYRO.MaxTorque = VT(0,40000000,0)
  1043. for i=0, 1, 0.1 / Animation_Speed do
  1044. Swait()
  1045. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  1046. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1047. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(15), RAD(-35)), 0.75 / Animation_Speed)
  1048. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0) * ANGLES(RAD(115), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  1049. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  1050. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1051. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.3 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(5), RAD(0), RAD(-25)), 0.75 / Animation_Speed)
  1052. end
  1053. GYRO:remove()
  1054. CreateSound(696483710, Gun, 5, 1, false)
  1055. WACKYEFFECT({Time = 3, EffectType = "Sphere", Size = VT(1,0.3,0.3), Size2 = VT(1,0,0), Transparency = 0, Transparency2 = 1, CFrame = Gun.CFrame*CF(1.5,0.5,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1056. coroutine.resume(coroutine.create(function()
  1057. local Bullet = CreatePart(3, Effects, "SmoothPlastic", 0, 0, "Really red", "Sinful bullet", VT(0,0,0))
  1058. CreateMesh("SpecialMesh", Bullet, "FileMesh", "94295100", "", VT(6, 6, 7), VT(0,0, 0))
  1059. Bullet.CFrame = Gun.CFrame*CF(1.5,0.5,0)
  1060. local AIMPOINT = Mouse.Hit.p
  1061. local STARTPOS = Gun.CFrame*CF(1.5,0.5,0).p
  1062. local VECTOR = CF(STARTPOS,AIMPOINT)
  1063. local IMPACTED = false
  1064. CreateSound(1393698948, Bullet, 10, 1, true)
  1065. for E = 1, 50 do
  1066. if IMPACTED == true then
  1067. break
  1068. end
  1069. local TARGETPOINT = VECTOR*CF(0,0,-E*5)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,1,0).p
  1070. Bullet.CFrame = CF(Bullet.Position,TARGETPOINT)
  1071. for i = 1, 5 do
  1072. Swait()
  1073. WACKYEFFECT({Time = 15, EffectType = "Swirl", Size = VT(1,1,1), Size2 = VT(3,3,3), Transparency = 0, Transparency2 = 1, CFrame = Bullet.CFrame * ANGLES(RAD(90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i+E, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = 1, SoundVolume = 5})
  1074. Bullet.CFrame = Bullet.CFrame*CF(0,0,-1)
  1075. local AIMHIT,AIMPOS,NORMAL = Raycast(Bullet.Position,Bullet.CFrame.lookVector,1.3,Character)
  1076. if AIMHIT ~= nil then
  1077. IMPACTED = true
  1078. break
  1079. end
  1080. end
  1081. end
  1082. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(10,10,10), Size2 = VT(9,9,9), Transparency = 0, Transparency2 = 1, CFrame = Bullet.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 182765513, SoundPitch = MRANDOM(8,12)/10, SoundVolume = 7})
  1083. for i = 1, 7 do
  1084. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(1,15,1), Size2 = VT(0,25,0), Transparency = 0, Transparency2 = 1, CFrame = Bullet.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1085. end
  1086. Ghostify(Bullet.Position,10)
  1087. Bullet:remove()
  1088. end))
  1089. for i=0, 0.3, 0.1 / Animation_Speed do
  1090. Swait()
  1091. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1092. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(15), RAD(-35)), 0.75 / Animation_Speed)
  1093. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0.3) * ANGLES(RAD(110), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
  1094. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.75 / Animation_Speed)
  1095. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.8 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-35), RAD(0), RAD(35)), 0.75 / Animation_Speed)
  1096. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.3 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(5), RAD(0), RAD(-25)), 0.75 / Animation_Speed)
  1097. end
  1098. ATTACK = false
  1099. Rooted = false
  1100. end
  1101.  
  1102. --//=================================\\
  1103. --|| ASSIGN THINGS TO KEYS
  1104. --\\=================================//
  1105.  
  1106. function MouseDown(Mouse)
  1107. if ATTACK == false then
  1108. end
  1109. end
  1110.  
  1111. function MouseUp(Mouse)
  1112. HOLD = false
  1113. end
  1114.  
  1115. function KeyDown(Key)
  1116. KEYHOLD = true
  1117. if Key == "z" and ATTACK == false then
  1118. Shell()
  1119. end
  1120.  
  1121. if Key == "t" and ATTACK == false then
  1122. Taunt()
  1123. end
  1124.  
  1125. if Key == "x" and ATTACK == false then
  1126. SinfulShell()
  1127. end
  1128. end
  1129.  
  1130. function KeyUp(Key)
  1131. KEYHOLD = false
  1132. end
  1133.  
  1134. Mouse.Button1Down:connect(function(NEWKEY)
  1135. MouseDown(NEWKEY)
  1136. end)
  1137. Mouse.Button1Up:connect(function(NEWKEY)
  1138. MouseUp(NEWKEY)
  1139. end)
  1140. Mouse.KeyDown:connect(function(NEWKEY)
  1141. KeyDown(NEWKEY)
  1142. end)
  1143. Mouse.KeyUp:connect(function(NEWKEY)
  1144. KeyUp(NEWKEY)
  1145. end)
  1146.  
  1147. --//=================================\\
  1148. --\\=================================//
  1149.  
  1150.  
  1151. function unanchor()
  1152. if UNANCHOR == true then
  1153. g = Character:GetChildren()
  1154. for i = 1, #g do
  1155. if g[i].ClassName == "Part" then
  1156. g[i].Anchored = false
  1157. end
  1158. end
  1159. end
  1160. end
  1161.  
  1162.  
  1163. --//=================================\\
  1164. --|| WRAP THE WHOLE SCRIPT UP
  1165. --\\=================================//
  1166.  
  1167. Humanoid.Changed:connect(function(Jump)
  1168. if Jump == "Jump" and (Disable_Jump == true) then
  1169. Humanoid.Jump = false
  1170. end
  1171. end)
  1172.  
  1173. local BLINKLOOP = 0
  1174.  
  1175. while true do
  1176. Swait()
  1177. script.Parent = WEAPONGUI
  1178. ANIMATE.Parent = nil
  1179. Humanoid.Parent = Character
  1180. if Humanoid then
  1181. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1182. IDLEANIMATION:Play()
  1183. end
  1184. SINE = SINE + CHANGE
  1185. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1186. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1187. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1188. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1189. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1190. 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)
  1191. 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)
  1192. 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)
  1193. 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)
  1194. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1195. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1196. 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)
  1197. 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)
  1198. 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)
  1199. end
  1200. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1201. ANIM = "Jump"
  1202. if ATTACK == false then
  1203. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1204. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1205. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1206. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1207. 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)
  1208. 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)
  1209. end
  1210. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1211. ANIM = "Fall"
  1212. if ATTACK == false then
  1213. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1214. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1215. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1216. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1217. 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)
  1218. 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)
  1219. end
  1220. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1221. ANIM = "Idle"
  1222. if ATTACK == false then
  1223. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(25), RAD(0), RAD(15)), 0.15 / Animation_Speed)
  1224. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 0.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  1225. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0) * ANGLES(RAD(25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1226. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.45, -0.1) * ANGLES(RAD(25), RAD(0), RAD(5)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1227. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  1228. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
  1229. end
  1230. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1231. ANIM = "Walk"
  1232. if ATTACK == false then
  1233. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.2) * ANGLES(RAD(30), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1234. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 3 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1235. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.7 - 0.1 * COS(SINE / 12), 0) * ANGLES(RAD(30), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed)
  1236. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(30-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  1237. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(30), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  1238. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(30), RAD(-75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  1239. end
  1240. end
  1241. unanchor()
  1242. Humanoid.MaxHealth = "inf"
  1243. Humanoid.Health = "inf"
  1244. if Rooted == false then
  1245. Disable_Jump = false
  1246. Humanoid.WalkSpeed = Speed
  1247. elseif Rooted == true then
  1248. Disable_Jump = true
  1249. Humanoid.WalkSpeed = 0
  1250. end
  1251. sick.SoundId = "rbxassetid://1429729391"
  1252. sick.Looped = true
  1253. sick.Pitch = 1
  1254. sick.Volume = 1.3
  1255. sick.Playing = true
  1256. sick.Parent = Torso
  1257. if Head:FindFirstChild("face") then
  1258. Head.face.Texture = "rbxassetid://315622231"
  1259. end
  1260. BLINKLOOP = BLINKLOOP + 1
  1261. if BLINKLOOP >=650 then
  1262. BLINKLOOP = 0
  1263. Blink()
  1264. end
  1265. if #GHOSTS>0 then
  1266. for e=1,#GHOSTS do
  1267. if GHOSTS[e]~=nil then
  1268. local Thing=GHOSTS[e]
  1269. if Thing~=nil then
  1270. if Thing:FindFirstChild("Head") then
  1271. if Thing:FindFirstChild("Head"):FindFirstChild("face") then
  1272. Thing:FindFirstChild("Head").face.Texture = "rbxassetid://479674570"
  1273. end
  1274. if Thing:FindFirstChild("Head"):FindFirstChildOfClass("Sound") then
  1275. Thing:FindFirstChild("Head"):FindFirstChildOfClass("Sound"):remove()
  1276. end
  1277. end
  1278. local TORSO = Thing:FindFirstChild("Torso")
  1279. if TORSO then
  1280. TORSO.Anchored = false
  1281. local ROOT = Thing.HumanoidRootPart
  1282. local RootJoint1 = ROOT:FindFirstChild("RootJoint")
  1283. local Neck1 = TORSO:FindFirstChild("Neck")
  1284. local RightShoulder1 = TORSO:FindFirstChild("Right Shoulder")
  1285. local LeftShoulder1 = TORSO:FindFirstChild("Left Shoulder")
  1286. local RightHip1 = TORSO:FindFirstChild("Right Hip")
  1287. local LeftHip1 = TORSO:FindFirstChild("Left Hip")
  1288. if ROOT and RootJoint1 then
  1289. local VELOCITY = (ROOT.Velocity * VT(1, 0, 1)).magnitude
  1290. if VELOCITY < 1 then
  1291. 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)))
  1292. 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)))
  1293. 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
  1294. 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
  1295. 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))
  1296. 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))
  1297. elseif VELOCITY > 1 then
  1298. 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)))
  1299. 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)))
  1300. 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
  1301. 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
  1302. 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))
  1303. 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))
  1304. end
  1305. end
  1306. local Human = Thing.Humanoid
  1307. if Human then
  1308. Human.HipHeight = 0.3
  1309. for _, c in pairs(Thing:GetChildren()) do
  1310. if c.ClassName == "Part" and c.Transparency < 1 then
  1311. c.Color = C3(0,0,0)
  1312. c.Transparency = 0.65 + 0.15 * COS(SINE / 25)
  1313. elseif c.ClassName == "Accessory" or c.ClassName == "Hat" or c.ClassName == "CharacterMesh" or c.ClassName == "Shirt" or c.ClassName == "Pants" then
  1314. c:remove()
  1315. end
  1316. end
  1317. if Human then
  1318. local IDLEANIMATION = Human:LoadAnimation(ROBLOXIDLEANIMATION)
  1319. IDLEANIMATION:Play()
  1320. end
  1321. local list = game.Workspace:children()
  1322. local torso = nil
  1323. local dist = 50
  1324. local temp = nil
  1325. local human = nil
  1326. local temp2 = nil
  1327. local OwnerInDanger = false
  1328. for x = 1, #list do
  1329. temp2 = list[x]
  1330. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2 ~= Thing) then
  1331. temp = temp2:findFirstChild("Torso") or temp2:findFirstChild("UpperTorso")
  1332. human = temp2:findFirstChildOfClass("Humanoid")
  1333. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1334. if (temp.Position - Torso.Position).magnitude < 15 then
  1335. OwnerInDanger = true
  1336. newdist = (temp.Position - TORSO.Position).magnitude
  1337. dist = (Torso.Position - temp.Position).magnitude
  1338. Human:MoveTo(temp.Position)
  1339. torso = temp
  1340. if newdist < 7 then
  1341. torso.CFrame = CF(torso.Position,TORSO.Position)*CF(0,0,5)
  1342. CreateSound(814168787, temp, 1, 2, false)
  1343. ApplyDamage(human,MRANDOM(15,35),temp)
  1344. 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})
  1345. 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})
  1346. end
  1347. end
  1348. end
  1349. end
  1350. end
  1351. if OwnerInDanger == false then
  1352. for x = 1, #list do
  1353. temp2 = list[x]
  1354. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2 ~= Thing) then
  1355. temp = temp2:findFirstChild("Torso") or temp2:findFirstChild("UpperTorso")
  1356. human = temp2:findFirstChildOfClass("Humanoid")
  1357. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1358. if (temp.Position - Torso.Position).magnitude < dist then
  1359. newdist = (temp.Position - TORSO.Position).magnitude
  1360. Human:MoveTo(temp.Position)
  1361. torso = temp
  1362. if newdist < 15 then
  1363. if MRANDOM(1,35) == 1 then
  1364. CreateSound(438665935, temp, 1, 3, false)
  1365. ApplyDamage(human,MRANDOM(2,20),temp)
  1366. 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})
  1367. end
  1368. end
  1369. end
  1370. end
  1371. end
  1372. end
  1373. end
  1374. if torso == nil then
  1375. Human.WalkSpeed = Speed -0.2
  1376. if (Torso.Position - TORSO.Position).magnitude < 12 and (Torso.Position - TORSO.Position).magnitude >= 11 then
  1377. Human:MoveTo(TORSO.Position)
  1378. elseif (Torso.Position - TORSO.Position).magnitude > 15 then
  1379. Human:MoveTo(Torso.Position)
  1380. elseif (Torso.Position - TORSO.Position).magnitude < 11 then
  1381. Human:MoveTo(CF(Torso.Position,TORSO.Position)*CF(0,0,-5).p)
  1382. end
  1383. else
  1384. if OwnerInDanger == false then
  1385. Human.WalkSpeed = Speed*1.2
  1386. else
  1387. Human.WalkSpeed = Speed*5
  1388. end
  1389. end
  1390. if Human.Health == 0 then
  1391. Thing:remove()
  1392. table.remove(GHOSTS,e)
  1393. else
  1394. Human.Health = Human.Health + 0.5
  1395. end
  1396. else
  1397. Thing:remove()
  1398. table.remove(GHOSTS,e)
  1399. end
  1400. else
  1401. Thing:remove()
  1402. table.remove(GHOSTS,e)
  1403. end
  1404. end
  1405. end
  1406. end
  1407. end
  1408. refit()
  1409. end
  1410.  
  1411. --//=================================\\
  1412. --\\=================================//
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418. --//====================================================\\--
  1419. --|| END OF SCRIPT
  1420. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement