Advertisement
13242

Untitled

Nov 2nd, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.59 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. wait(0.2)
  3.  
  4. Player = game:GetService("Players").owner
  5. PlayerGui = Player.PlayerGui
  6. Cam = workspace.CurrentCamera
  7. Backpack = Player.Backpack
  8. Character = Player.Character
  9. Humanoid = Character.Humanoid
  10. Mouse = Player:GetMouse()
  11. RootPart = Character["HumanoidRootPart"]
  12. Torso = Character["Torso"]
  13. Head = Character["Head"]
  14. RightArm = Character["Right Arm"]
  15. LeftArm = Character["Left Arm"]
  16. RightLeg = Character["Right Leg"]
  17. LeftLeg = Character["Left Leg"]
  18. RootJoint = RootPart["RootJoint"]
  19. Neck = Torso["Neck"]
  20. RightShoulder = Torso["Right Shoulder"]
  21. LeftShoulder = Torso["Left Shoulder"]
  22. RightHip = Torso["Right Hip"]
  23. LeftHip = Torso["Left Hip"]
  24. KEYHOLD = false
  25. IT = Instance.new
  26. CF = CFrame.new
  27. VT = Vector3.new
  28. RAD = math.rad
  29. C3 = Color3.new
  30. UD2 = UDim2.new
  31. BRICKC = BrickColor.new
  32. ANGLES = CFrame.Angles
  33. EULER = CFrame.fromEulerAnglesXYZ
  34. COS = math.cos
  35. ACOS = math.acos
  36. SIN = math.sin
  37. ASIN = math.asin
  38. ABS = math.abs
  39. MRANDOM = math.random
  40. FLOOR = math.floor
  41. local Torsos = {}
  42.  
  43. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  44. local NEWMESH = IT(MESH)
  45. if MESH == "SpecialMesh" then
  46. NEWMESH.MeshType = MESHTYPE
  47. if MESHID ~= "nil" and MESHID ~= "" then
  48. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  49. end
  50. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  51. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  52. end
  53. end
  54. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  55. NEWMESH.Scale = SCALE
  56. NEWMESH.Parent = PARENT
  57. return NEWMESH
  58. end
  59.  
  60. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
  61. local NEWPART = IT("Part")
  62. NEWPART.formFactor = FORMFACTOR
  63. NEWPART.Reflectance = REFLECTANCE
  64. NEWPART.Transparency = TRANSPARENCY
  65. NEWPART.CanCollide = false
  66. NEWPART.Locked = true
  67. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  68. NEWPART.Name = NAME
  69. NEWPART.Size = SIZE
  70. NEWPART.Position = Torso.Position
  71. NEWPART.Material = MATERIAL
  72. NEWPART:BreakJoints()
  73. NEWPART.Parent = PARENT
  74. return NEWPART
  75. end
  76.  
  77.  
  78. --//=================================\\
  79. --|| CUSTOMIZATION
  80. --\\=================================//
  81.  
  82. Class_Name = "Template"
  83. Weapon_Name = "Add-ons"
  84.  
  85. Custom_Colors = {
  86. Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
  87. Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
  88.  
  89. Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
  90. Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
  91. Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
  92. Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
  93. Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
  94.  
  95. Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
  96. Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
  97. Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
  98. Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
  99. Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
  100. }
  101.  
  102.  
  103. Player_Size = 1 --Size of the player.
  104. Animation_Speed = 3
  105. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  106.  
  107. local Speed = 16
  108. local Effects2 = {}
  109.  
  110. --//=================================\\
  111. --|| END OF CUSTOMIZATION
  112. --\\=================================//
  113.  
  114. local function weldBetween(a, b)
  115. local weldd = Instance.new("ManualWeld")
  116. weldd.Part0 = a
  117. weldd.Part1 = b
  118. weldd.C0 = CFrame.new()
  119. weldd.C1 = b.CFrame:inverse() * a.CFrame
  120. weldd.Parent = a
  121. return weldd
  122. end
  123.  
  124. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  125. local acs = Instance.new("Part")
  126. acs.CanCollide = false
  127. acs.Anchored = false
  128. acs.Size = Vector3.new(0,0,0)
  129. acs.CFrame = attachmentpart.CFrame
  130. acs.Parent = Character
  131. acs.BrickColor = color
  132. local meshs = Instance.new("SpecialMesh")
  133. meshs.MeshId = mesh
  134. meshs.TextureId = texture
  135. meshs.Parent = acs
  136. meshs.Scale = scale
  137. meshs.Offset = offset
  138. weldBetween(attachmentpart,acs)
  139. end
  140.  
  141. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  142. if TYPE == "Gem" then
  143. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  144. acs.Anchored = false
  145. acs.CanCollide = false
  146. acs.CFrame = PART.CFrame
  147. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  148. weldBetween(PART,acs)
  149. elseif TYPE == "Skull" then
  150. local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  151. acs.Anchored = false
  152. acs.CanCollide = false
  153. acs.CFrame = PART.CFrame
  154. local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  155. weldBetween(PART,acs)
  156. elseif TYPE == "Eye" then
  157. local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  158. acs.Anchored = false
  159. acs.CanCollide = false
  160. acs.CFrame = PART.CFrame
  161. local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  162. weldBetween(PART,acs)
  163. end
  164. end
  165.  
  166. --//=================================\\
  167. --|| USEFUL VALUES
  168. --\\=================================//
  169.  
  170. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  171. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  172. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  173. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  174. local CO1 = 0
  175. local CO2 = 0
  176. local CO3 = 0
  177. local CO4 = 0
  178. local CHANGEDEFENSE = 0
  179. local CHANGEDAMAGE = 0
  180. local CHANGEMOVEMENT = 0
  181. local ANIM = "Idle"
  182. local ATTACK = false
  183. local EQUIPPED = false
  184. local HOLD = false
  185. local COMBO = 1
  186. local LASTPOINT = nil
  187. local BLCF = nil
  188. local SCFR = nil
  189. local STAGGERHITANIM = false
  190. local STAGGERANIM = false
  191. local STUNANIM = false
  192. local CRITCHANCENUMBER = 0
  193. local IDLENUMBER = 0
  194. local DONUMBER = 0
  195. local HANDIDLE = false
  196. local SINE = 0
  197. local CHANGE = 2 / Animation_Speed
  198. local WALKINGANIM = false
  199. local WALK = 0
  200. local DISABLEJUMPING = false
  201. local HASBEENBLOCKED = false
  202. local STUNDELAYNUMBER = 0
  203. local MANADELAYNUMBER = 0
  204. local SECONDARYMANADELAYNUMBER = 0
  205. local ROBLOXIDLEANIMATION = IT("Animation")
  206. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  207. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  208. --ROBLOXIDLEANIMATION.Parent = Humanoid
  209. local WEAPONGUI = IT("ScreenGui", nil)
  210. WEAPONGUI.Name = "Weapon GUI"
  211. local WEAPONTOOL = IT("HopperBin", nil)
  212. WEAPONTOOL.Name = Weapon_Name
  213. local Weapon = IT("Model")
  214. Weapon.Name = Weapon_Name
  215. local Effects = IT("Folder", Weapon)
  216. Effects.Name = "Effects"
  217. local ANIMATOR = Humanoid.Animator
  218. local ANIMATE = Character.Animate
  219. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  220. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  221. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  222. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  223. local UNANCHOR = true
  224.  
  225. --//=================================\\
  226. --\\=================================//
  227.  
  228. --//=================================\\
  229. --|| STATS
  230. --\\=================================//
  231.  
  232. if Character:FindFirstChild("Stats") ~= nil then
  233. Character:FindFirstChild("Stats").Parent = nil
  234. end
  235.  
  236. local Stats = IT("Folder", nil)
  237. Stats.Name = "Stats"
  238. local ChangeStat = IT("Folder", Stats)
  239. ChangeStat.Name = "ChangeStat"
  240. local Defense = IT("NumberValue", Stats)
  241. Defense.Name = "Defense"
  242. Defense.Value = 1
  243. local Movement = IT("NumberValue", Stats)
  244. Movement.Name = "Movement"
  245. Movement.Value = 1
  246. local Damage = IT("NumberValue", Stats)
  247. Damage.Name = "Damage"
  248. Damage.Value = 1
  249. local Mana = IT("NumberValue", Stats)
  250. Mana.Name = "Mana"
  251. Mana.Value = 0
  252. local SecondaryMana = IT("NumberValue", Stats)
  253. SecondaryMana.Name = "SecondaryMana"
  254. SecondaryMana.Value = 0
  255. local CanCrit = IT("BoolValue", Stats)
  256. CanCrit.Name = "CanCrit"
  257. CanCrit.Value = false
  258. local CritChance = IT("NumberValue", Stats)
  259. CritChance.Name = "CritChance"
  260. CritChance.Value = 20
  261. local CanPenetrateArmor = IT("BoolValue", Stats)
  262. CanPenetrateArmor.Name = "CanPenetrateArmor"
  263. CanPenetrateArmor.Value = false
  264. local AntiTeamKill = IT("BoolValue", Stats)
  265. AntiTeamKill.Name = "AntiTeamKill"
  266. AntiTeamKill.Value = false
  267. local Rooted = IT("BoolValue", Stats)
  268. Rooted.Name = "Rooted"
  269. Rooted.Value = false
  270. local Block = IT("BoolValue", Stats)
  271. Block.Name = "Block"
  272. Block.Value = false
  273. local RecentEnemy = IT("ObjectValue", Stats)
  274. RecentEnemy.Name = "RecentEnemy"
  275. RecentEnemy.Value = nil
  276. local StaggerHit = IT("BoolValue", Stats)
  277. StaggerHit.Name = "StaggerHit"
  278. StaggerHit.Value = false
  279. local Stagger = IT("BoolValue", Stats)
  280. Stagger.Name = "Stagger"
  281. Stagger.Value = false
  282. local Stun = IT("BoolValue", Stats)
  283. Stun.Name = "Stun"
  284. Stun.Value = false
  285. local StunValue = IT("NumberValue", Stats)
  286. StunValue.Name = "StunValue"
  287. StunValue.Value = 0
  288.  
  289.  
  290. --//=================================\\
  291. --\\=================================//
  292.  
  293.  
  294.  
  295.  
  296.  
  297. --//=================================\\
  298. --|| DEBUFFS / BUFFS
  299. --\\=================================//
  300.  
  301. local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
  302. DEFENSECHANGE1.Name = "ChangeDefense"
  303. DEFENSECHANGE1.Value = 0
  304.  
  305. local MOVEMENTCHANGE1 = IT("NumberValue", nil)
  306. MOVEMENTCHANGE1.Name = "ChangeMovement"
  307. MOVEMENTCHANGE1.Value = 0
  308.  
  309. --//=================================\\
  310. --\\=================================//
  311.  
  312.  
  313.  
  314.  
  315.  
  316. --//=================================\\
  317. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  318. --\\=================================//
  319.  
  320. ArtificialHB = Instance.new("BindableEvent", script)
  321. ArtificialHB.Name = "ArtificialHB"
  322.  
  323. script:WaitForChild("ArtificialHB")
  324.  
  325. frame = Frame_Speed
  326. tf = 0
  327. allowframeloss = false
  328. tossremainder = false
  329. lastframe = tick()
  330. script.ArtificialHB:Fire()
  331.  
  332. game:GetService("RunService").Heartbeat:connect(function(s, p)
  333. tf = tf + s
  334. if tf >= frame then
  335. if allowframeloss then
  336. script.ArtificialHB:Fire()
  337. lastframe = tick()
  338. else
  339. for i = 1, math.floor(tf / frame) do
  340. script.ArtificialHB:Fire()
  341. end
  342. lastframe = tick()
  343. end
  344. if tossremainder then
  345. tf = 0
  346. else
  347. tf = tf - frame * math.floor(tf / frame)
  348. end
  349. end
  350. end)
  351.  
  352. --//=================================\\
  353. --\\=================================//
  354.  
  355.  
  356.  
  357.  
  358.  
  359. --//=================================\\
  360. --|| SOME FUNCTIONS
  361. --\\=================================//
  362.  
  363. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  364. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  365. end
  366.  
  367. function PositiveAngle(NUMBER)
  368. if NUMBER >= 0 then
  369. NUMBER = 0
  370. end
  371. return NUMBER
  372. end
  373.  
  374. function NegativeAngle(NUMBER)
  375. if NUMBER <= 0 then
  376. NUMBER = 0
  377. end
  378. return NUMBER
  379. end
  380.  
  381. function Swait(NUMBER)
  382. if NUMBER == 0 or NUMBER == nil then
  383. ArtificialHB.Event:wait()
  384. else
  385. for i = 1, NUMBER do
  386. ArtificialHB.Event:wait()
  387. end
  388. end
  389. end
  390.  
  391. function QuaternionFromCFrame(cf)
  392. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  393. local trace = m00 + m11 + m22
  394. if trace > 0 then
  395. local s = math.sqrt(1 + trace)
  396. local recip = 0.5 / s
  397. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  398. else
  399. local i = 0
  400. if m11 > m00 then
  401. i = 1
  402. end
  403. if m22 > (i == 0 and m00 or m11) then
  404. i = 2
  405. end
  406. if i == 0 then
  407. local s = math.sqrt(m00 - m11 - m22 + 1)
  408. local recip = 0.5 / s
  409. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  410. elseif i == 1 then
  411. local s = math.sqrt(m11 - m22 - m00 + 1)
  412. local recip = 0.5 / s
  413. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  414. elseif i == 2 then
  415. local s = math.sqrt(m22 - m00 - m11 + 1)
  416. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  417. end
  418. end
  419. end
  420.  
  421. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  422. local xs, ys, zs = x + x, y + y, z + z
  423. local wx, wy, wz = w * xs, w * ys, w * zs
  424. local xx = x * xs
  425. local xy = x * ys
  426. local xz = x * zs
  427. local yy = y * ys
  428. local yz = y * zs
  429. local zz = z * zs
  430. 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))
  431. end
  432.  
  433. function QuaternionSlerp(a, b, t)
  434. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  435. local startInterp, finishInterp;
  436. if cosTheta >= 0.0001 then
  437. if (1 - cosTheta) > 0.0001 then
  438. local theta = ACOS(cosTheta)
  439. local invSinTheta = 1 / SIN(theta)
  440. startInterp = SIN((1 - t) * theta) * invSinTheta
  441. finishInterp = SIN(t * theta) * invSinTheta
  442. else
  443. startInterp = 1 - t
  444. finishInterp = t
  445. end
  446. else
  447. if (1 + cosTheta) > 0.0001 then
  448. local theta = ACOS(-cosTheta)
  449. local invSinTheta = 1 / SIN(theta)
  450. startInterp = SIN((t - 1) * theta) * invSinTheta
  451. finishInterp = SIN(t * theta) * invSinTheta
  452. else
  453. startInterp = t - 1
  454. finishInterp = t
  455. end
  456. end
  457. 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
  458. end
  459.  
  460. function Clerp(a, b, t)
  461. local qa = {QuaternionFromCFrame(a)}
  462. local qb = {QuaternionFromCFrame(b)}
  463. local ax, ay, az = a.x, a.y, a.z
  464. local bx, by, bz = b.x, b.y, b.z
  465. local _t = 1 - t
  466. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  467. end
  468.  
  469. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  470. local frame = IT("Frame")
  471. frame.BackgroundTransparency = TRANSPARENCY
  472. frame.BorderSizePixel = BORDERSIZEPIXEL
  473. frame.Position = POSITION
  474. frame.Size = SIZE
  475. frame.BackgroundColor3 = COLOR
  476. frame.BorderColor3 = BORDERCOLOR
  477. frame.Name = NAME
  478. frame.Parent = PARENT
  479. return frame
  480. end
  481.  
  482. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  483. local label = IT("TextLabel")
  484. label.BackgroundTransparency = 1
  485. label.Size = UD2(1, 0, 1, 0)
  486. label.Position = UD2(0, 0, 0, 0)
  487. label.TextColor3 = C3(255, 255, 255)
  488. label.TextStrokeTransparency = STROKETRANSPARENCY
  489. label.TextTransparency = TRANSPARENCY
  490. label.FontSize = TEXTFONTSIZE
  491. label.Font = TEXTFONT
  492. label.BorderSizePixel = BORDERSIZEPIXEL
  493. label.TextScaled = true
  494. label.Text = TEXT
  495. label.Name = NAME
  496. label.Parent = PARENT
  497. return label
  498. end
  499.  
  500. function NoOutlines(PART)
  501. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  502. end
  503.  
  504.  
  505. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  506. local NEWWELD = IT(TYPE)
  507. NEWWELD.Part0 = PART0
  508. NEWWELD.Part1 = PART1
  509. NEWWELD.C0 = C0
  510. NEWWELD.C1 = C1
  511. NEWWELD.Parent = PARENT
  512. return NEWWELD
  513. end
  514.  
  515. function CreateSound(ID, PARENT, VOLUME, PITCH)
  516. coroutine.resume(coroutine.create(function()
  517. local NEWSOUND = IT("Sound", PARENT)
  518. NEWSOUND.Volume = VOLUME
  519. NEWSOUND.Pitch = PITCH
  520. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  521. Swait()
  522. NEWSOUND:play()
  523. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  524. end))
  525. end
  526.  
  527. --//=================================\\
  528. --\\=================================//
  529.  
  530.  
  531.  
  532.  
  533.  
  534. --//=================================\\
  535. --|| RESIZE PLAYER
  536. --\\=================================//
  537.  
  538. if Player_Size ~= 1 then
  539. RootPart.Size = RootPart.Size * Player_Size
  540. Torso.Size = Torso.Size * Player_Size
  541. Head.Size = Head.Size * Player_Size
  542. RightArm.Size = RightArm.Size * Player_Size
  543. LeftArm.Size = LeftArm.Size * Player_Size
  544. RightLeg.Size = RightLeg.Size * Player_Size
  545. LeftLeg.Size = LeftLeg.Size * Player_Size
  546. RootJoint.Parent = RootPart
  547. Neck.Parent = Torso
  548. RightShoulder.Parent = Torso
  549. LeftShoulder.Parent = Torso
  550. RightHip.Parent = Torso
  551. LeftHip.Parent = Torso
  552.  
  553. RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
  554. RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
  555. Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0))
  556. Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180))
  557. RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0
  558. LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0
  559. if Disable_Moving_Arms == false then
  560. RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
  561. LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
  562. else
  563. RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
  564. LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
  565. end
  566. RightHip.C0 = CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
  567. LeftHip.C0 = CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
  568. RightHip.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
  569. LeftHip.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
  570. --------------------
  571. end
  572.  
  573.  
  574. --//=================================\\
  575. --\\=================================//
  576.  
  577.  
  578.  
  579.  
  580. --//=================================\\
  581. --|| WEAPON CREATION
  582. --\\=================================//
  583.  
  584. if Player_Size ~= 1 then
  585. for _, v in pairs (Weapon:GetChildren()) do
  586. if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
  587. local p1 = v.Part1
  588. v.Part1 = nil
  589. local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
  590. v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
  591. v.Part1 = p1
  592. elseif v.ClassName == "Part" then
  593. for _, b in pairs (v:GetChildren()) do
  594. if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
  595. b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
  596. end
  597. end
  598. end
  599. end
  600. end
  601.  
  602. for _, c in pairs(Weapon:GetChildren()) do
  603. if c.ClassName == "Part" then
  604. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  605. end
  606. end
  607.  
  608. Weapon.Parent = Character
  609.  
  610. print(Class_Name.." loaded.")
  611.  
  612. --//=================================\\
  613. --\\=================================//
  614.  
  615.  
  616.  
  617. --//=================================\\
  618. --|| ATTACK FUNCTIONS AND STUFF
  619. --\\=================================//
  620.  
  621. local raysound = Instance.new("Sound",Character)
  622. raysound.SoundId = "rbxassetid://346067083"
  623. raysound.Pitch = 2
  624. raysound.Looped = true
  625. raysound.Volume = 10
  626.  
  627. function pew()
  628. ATTACK = true
  629. local sphere = Instance.new("Part",Effects)
  630. sphere.Size = Vector3.new(0,0,0)
  631. sphere.Material = "Neon"
  632. sphere.Shape = "Ball"
  633. sphere.Name = "AntimatterRay"
  634. sphere.Anchored = true
  635. sphere.Color = Color3.new(0,0,0)
  636. sphere.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*27
  637. sphere.CanCollide = false
  638. local hit = sphere.Touched:connect(function(hit)
  639. if hit.Parent ~= Character and hit.Parent.Parent ~= Character and hit.Parent ~= Effects and hit.Anchored == false and hit:FindFirstChild("Vanishing") == nil then
  640. if hit.Parent:FindFirstChild("Humanoid") then
  641. hit.Parent:BreakJoints()
  642. if hit.Parent:FindFirstChild("Vanishing") == nil then
  643. local vanish = Instance.new("BoolValue",hit.Parent)
  644. vanish.Name = "Vanishing"
  645. local sound = Instance.new("Sound",hit)
  646. sound.SoundId = "rbxassetid://179497874"
  647. sound.Volume = 10
  648. sound:Play()
  649. end
  650. else
  651. local vanish = Instance.new("BoolValue",hit)
  652. vanish.Name = "Vanishing"
  653. hit.Color = Color3.new(0,0,0)
  654. table.insert(Effects2,{hit,"Disappear",0.07,0,1,1,1})
  655. if hit:FindFirstChildOfClass("SpecialMesh") then
  656. local mesh = hit:FindFirstChildOfClass("SpecialMesh")
  657. mesh.TextureId = ""
  658. end
  659. end
  660. end
  661. end)
  662. repeat
  663. Swait()
  664. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Mouse.Hit.p) * CFrame.new(0, 0, 0)
  665. sphere.Size = sphere.Size + Vector3.new(1,1,1)
  666. sphere.Color = Color3.new(0,(sphere.Size.Y/200),0)
  667. sphere.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*(sphere.Size.Y/1.75)
  668. until KEYHOLD == false or sphere.Size.Y > 200
  669. CreateSound("11944350", Effects, 10, 1)
  670. local bv = Instance.new("BodyVelocity")
  671. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  672. bv.velocity = RootPart.CFrame.lookVector*350
  673. bv.Parent = sphere
  674. bv.Name = "DASH"
  675. sphere.Anchored = false
  676. ATTACK = false
  677. game:GetService("Debris"):AddItem(sphere, 15)
  678. end
  679.  
  680. function HoldRay()
  681. ATTACK = true
  682. UNANCHOR = false
  683. CreateSound("428800263", Torso, 15, 3.5)
  684. local sphere = Instance.new("Part",Effects)
  685. sphere.Size = Vector3.new(0,0,0)
  686. sphere.Material = "Neon"
  687. sphere.Shape = "Ball"
  688. sphere.Name = "AntimatterRay"
  689. sphere.Anchored = true
  690. sphere.Color = Color3.new(59/255, 80/255, 45/255)
  691. sphere.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*15
  692. sphere.CanCollide = false
  693. for i=0, 1, 0.1 / Animation_Speed do
  694. Swait()
  695. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Mouse.Hit.p) * CFrame.new(0, 0, 0)
  696. sphere.Size = sphere.Size + Vector3.new(0.6,0.6,0.6)
  697. sphere.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*15
  698. end
  699. local sound = Instance.new("Sound",Effects)
  700. sound.SoundId = "rbxassetid://165487479"
  701. sound.Volume = 10
  702. sound:Play()
  703. repeat
  704. sphere.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*15
  705. Swait()
  706. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Mouse.Hit.p) * CFrame.new(0, 0, 0)
  707. until sound.Playing == false
  708. sound:remove()
  709. raysound:Play()
  710. local timer = 1
  711. local Lazor = Instance.new("Part",Effects)
  712. Lazor.Size = Vector3.new(12,12,1000)
  713. Lazor.Name = "AntimatterRay"
  714. Lazor.Material = "Neon"
  715. Lazor.Anchored = true
  716. Lazor.CanCollide = false
  717. Lazor.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*515
  718. Lazor.Color = Color3.new(0,0,0)
  719. Lazor.CFrame = Lazor.CFrame * CFrame.fromEulerAnglesXYZ(0,0,math.random(-180,180))
  720. local hit = Lazor.Touched:connect(function(hit)
  721. if hit.Parent ~= Character and hit.Parent.Parent ~= Character and hit.Parent ~= Effects and hit.Anchored == false and hit:FindFirstChild("Vanishing") == nil then
  722. if hit.Parent:FindFirstChild("Humanoid") then
  723. hit.Parent:BreakJoints()
  724. if hit.Parent:FindFirstChild("Vanishing") == nil then
  725. local vanish = Instance.new("BoolValue",hit.Parent)
  726. vanish.Name = "Vanishing"
  727. local sound = Instance.new("Sound",hit)
  728. sound.SoundId = "rbxassetid://179497874"
  729. sound.Volume = 10
  730. sound:Play()
  731. end
  732. else
  733. local vanish = Instance.new("BoolValue",hit)
  734. vanish.Name = "Vanishing"
  735. hit.Color = Color3.new(0,0,0)
  736. table.insert(Effects2,{hit,"Disappear",0.07,0,1,1,1})
  737. if hit:FindFirstChildOfClass("SpecialMesh") then
  738. local mesh = hit:FindFirstChildOfClass("SpecialMesh")
  739. mesh.TextureId = ""
  740. end
  741. end
  742. end
  743. end)
  744. local hit2 = sphere.Touched:connect(function(hit)
  745. if hit.Parent ~= Character and hit.Parent.Parent ~= Character and hit.Parent ~= Effects and hit.Anchored == false and hit:FindFirstChild("Vanishing") == nil then
  746. if hit.Parent:FindFirstChild("Humanoid") then
  747. hit.Parent:BreakJoints()
  748. if hit.Parent:FindFirstChild("Vanishing") == nil then
  749. local vanish = Instance.new("BoolValue",hit.Parent)
  750. vanish.Name = "Vanishing"
  751. local sound = Instance.new("Sound",hit)
  752. sound.SoundId = "rbxassetid://179497874"
  753. sound.Volume = 10
  754. sound:Play()
  755. end
  756. else
  757. local vanish = Instance.new("BoolValue",hit)
  758. vanish.Name = "Vanishing"
  759. hit.Color = Color3.new(0,0,0)
  760. table.insert(Effects2,{hit,"Disappear",0.07,0,1,1,1})
  761. if hit:FindFirstChildOfClass("SpecialMesh") then
  762. local mesh = hit:FindFirstChildOfClass("SpecialMesh")
  763. mesh.TextureId = ""
  764. end
  765. end
  766. end
  767. end)
  768. repeat
  769. if HOLD == true then
  770. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Mouse.Hit.p) * CFrame.new(0, 0, 0)
  771. Lazor.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*515
  772. sphere.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*15
  773. Lazor.CFrame = Lazor.CFrame * CFrame.fromEulerAnglesXYZ(0,0,math.random(-180,180))
  774. if timer ==1 then
  775. Lazor.Color = Color3.new(59/255, 80/255, 45/255)
  776. sphere.Color = Color3.new(59/255, 80/255, 45/255)
  777. timer = 2
  778. elseif timer ==2 then
  779. Lazor.Color = Color3.new(39/255, 70/255, 45/255)
  780. sphere.Color = Color3.new(39/255, 70/255, 45/255)
  781. timer = 1
  782. end
  783. end
  784. Swait()
  785. until HOLD == false
  786. for i=0, 1, 0.1 / Animation_Speed/2 do
  787. Swait()
  788. Lazor.CFrame = Lazor.CFrame * CFrame.fromEulerAnglesXYZ(0,0,math.random(-180,180))
  789. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Mouse.Hit.p) * CFrame.new(0, 0, 0)
  790. Lazor.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*515
  791. sphere.CFrame = RootPart.CFrame + RootPart.CFrame.lookVector*15
  792. sphere.Anchored = true
  793. Lazor.Anchored = true
  794. sphere.Size = sphere.Size - Vector3.new(0.2,0.2,0.2)
  795. Lazor.Size = Lazor.Size - Vector3.new(0.5,0.5,0)
  796. Lazor.Transparency = Lazor.Transparency + 0.03
  797. sphere.Transparency = sphere.Transparency + 0.03
  798. raysound.Volume = raysound.Volume - 0.1
  799. if timer ==1 then
  800. Lazor.Color = Color3.new(59/255, 80/255, 45/255)
  801. sphere.Color = Color3.new(59/255, 80/255, 45/255)
  802. timer = 2
  803. elseif timer ==2 then
  804. Lazor.Color = Color3.new(39/255, 70/255, 45/255)
  805. sphere.Color = Color3.new(39/255, 70/255, 45/255)
  806. timer = 1
  807. end
  808. end
  809. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Vector3.new(Mouse.Hit.p.X,RootPart.Position.Y,Mouse.Hit.p.Z)) * CFrame.new(0, 0, 0)
  810. hit2:disconnect()
  811. hit:disconnect()
  812. raysound:Stop()
  813. raysound.Volume = 5
  814. sphere:remove()
  815. Lazor:remove()
  816. BLCF = nil
  817. SCFR = nil
  818. ATTACK = false
  819. UNANCHOR = true
  820. end
  821.  
  822. local sick = Instance.new("Sound",Character)
  823. sick.SoundId = "rbxassetid://145616154"
  824. sick.Looped = true
  825. sick.Pitch = 1
  826. sick.Volume = 10
  827. sick:Play()
  828.  
  829. local Spook = false
  830.  
  831. function spooky()
  832. Spook = true
  833. local cframe = nil
  834. local pos = nil
  835. sick:Stop()
  836. local sound = Instance.new("Sound",Effects)
  837. sound.SoundId = "rbxassetid://211540835"
  838. sound.Volume = 10
  839. sound:Play()
  840. q = workspace:GetChildren()
  841. for i = 1, #q do
  842. g = q[i]:GetChildren()
  843. for t = 1, #g do
  844. if g[t].Name == "Torso" or g[t].Name == "UpperTorso" and q[i] ~= Character then
  845. table.insert(Effects2,{g[t],"TorsoSpin",0,0,0,0})
  846. end
  847. end
  848. end
  849. repeat
  850. Swait()
  851. until sound.Playing == false
  852. sound:remove()
  853. sick:Play()
  854. Spook = false
  855. end
  856.  
  857. --//=================================\\
  858. --|| ASSIGN THINGS TO KEYS
  859. --\\=================================//
  860.  
  861. Humanoid.Changed:connect(function(Jump)
  862. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  863. Humanoid.Jump = false
  864. end
  865. end)
  866.  
  867. function MouseDown(Mouse)
  868. if HOLD == false and ATTACK == false then
  869. HOLD = true
  870. HoldRay()
  871. elseif HOLD == true then
  872. HOLD = false
  873. end
  874. end
  875.  
  876. function MouseUp(Mouse)
  877. end
  878.  
  879. function RayCast(Position, Direction, MaxDistance, IgnoreList)
  880. return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList)
  881. end
  882.  
  883. function KeyDown(Key)
  884. KEYHOLD = true
  885. if Key == "w" and HOLD == false and ATTACK == false then
  886. repeat
  887. local RayHit, RayPos = RayCast(RootPart.Position, RootPart.CFrame.lookVector*150, 1.8, {workspace})
  888. RootPart.CFrame = CFrame.new(RayPos,Mouse.Hit.p) * CFrame.new(0, 0, 0)
  889. Swait()
  890. until KEYHOLD == false
  891. end
  892. if Key == "s" and HOLD == false and ATTACK == false then
  893. repeat
  894. local RayHit, RayPos = RayCast(RootPart.Position, RootPart.CFrame.lookVector*-150, 1.8, {workspace})
  895. RootPart.CFrame = CFrame.new(RayPos,Mouse.Hit.p) * CFrame.new(0, 0, 0)
  896. Swait()
  897. until KEYHOLD == false
  898. end
  899. if Key == "z" and ATTACK == false then
  900. pew()
  901. end
  902. if Key == "f" and Spook == false then
  903. spooky()
  904. end
  905. end
  906.  
  907. function KeyUp(Key)
  908. KEYHOLD = false
  909. end
  910.  
  911. Mouse.Button1Down:connect(function(NEWKEY)
  912. MouseDown(NEWKEY)
  913. end)
  914. Mouse.Button1Up:connect(function(NEWKEY)
  915. MouseUp(NEWKEY)
  916. end)
  917. Mouse.KeyDown:connect(function(NEWKEY)
  918. KeyDown(NEWKEY)
  919. end)
  920. Mouse.KeyUp:connect(function(NEWKEY)
  921. KeyUp(NEWKEY)
  922. end)
  923.  
  924. --//=================================\\
  925. --\\=================================//
  926.  
  927.  
  928. function unanchor()
  929. if UNANCHOR == true then
  930. g = Character:GetChildren()
  931. for i = 1, #g do
  932. if g[i].ClassName == "Part" and g[i].Name ~= "HumanoidRootPart" then
  933. g[i].Anchored = false
  934. end
  935. end
  936. end
  937. RootPart.Anchored = true
  938. end
  939.  
  940.  
  941. --//=================================\\
  942. --|| WRAP THE WHOLE SCRIPT UP
  943. --\\=================================//
  944.  
  945. Humanoid.Changed:connect(function(Jump)
  946. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  947. Humanoid.Jump = false
  948. end
  949. end)
  950.  
  951. Humanoid.Died:connect(function()
  952. ATTACK = true
  953. sick:Stop()
  954. CreateSound("198973822", workspace, 10, 1)
  955. for i = 1, 15 do
  956. local bag = Instance.new("Part",workspace)
  957. bag.Size = VT(1.8, 1.6, 1.2)
  958. bag.CFrame = RootPart.CFrame
  959. local mesh = Instance.new("SpecialMesh",bag)
  960. mesh.MeshType = "FileMesh"
  961. mesh.MeshId = "http://www.roblox.com/asset/?id=19106014"
  962. mesh.TextureId = "rbxassetid://37305301"
  963. end
  964. q = Character:GetChildren()
  965. for i = 1, #q do
  966. if q[i].ClassName == "Model" or q[i].ClassName == "Part" then
  967. q[i]:remove()
  968. end
  969. end
  970. end)
  971.  
  972. RightArm:remove()
  973. LeftArm:remove()
  974. LeftLeg:remove()
  975. RightLeg:remove()
  976. Head.Transparency = 1
  977. Torso.Transparency = 1
  978. Head:ClearAllChildren()
  979. local HandlePart = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.25*Player_Size,0.25*Player_Size,1.5*Player_Size))
  980. local HandleWeld = CreateWeldOrSnapOrMotor("Weld", HandlePart, Torso, HandlePart, CF(0 * Player_Size, 1 * Player_Size, 1 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)), CF(0, 0, 0))
  981. local mesh = Instance.new("SpecialMesh",HandlePart)
  982. mesh.MeshId = "rbxassetid://438530093"
  983. mesh.TextureId = "rbxassetid://438530120"
  984. mesh.Scale = Vector3.new(0.7,1,1)
  985.  
  986. ANIMATE.Parent = nil
  987. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  988. IDLEANIMATION:Play()
  989.  
  990. while true do
  991. Swait()
  992. if #Effects2>0 then
  993. for e=1,#Effects2 do
  994. if Effects2[e]~=nil then
  995. local Thing=Effects2[e]
  996. if Thing~=nil then
  997. local Part=Thing[1]
  998. local Mode=Thing[2]
  999. local Delay=Thing[3]
  1000. local IncX=Thing[4]
  1001. local IncY=Thing[5]
  1002. local IncZ=Thing[6]
  1003. local Part2=Thing[8]
  1004. if Thing[1].Transparency<=1 then
  1005. if Thing[2]=="Block1" then
  1006. Thing[1].CFrame=Part2.CFrame
  1007. Mesh=Thing[1].Mesh
  1008. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1009. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1010. elseif Thing[2]=="Cylinder" then
  1011. Mesh=Thing[1].Mesh
  1012. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1013. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1014. elseif Thing[2]=="Blood" then
  1015. Mesh=Thing[7]
  1016. Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
  1017. Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
  1018. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1019. elseif Thing[2]=="Elec" then
  1020. Mesh=Thing[1].Mesh
  1021. Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
  1022. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1023. elseif Thing[2]=="Disappear" then
  1024. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1025. elseif Thing[2]=="TorsoSpin" and Spook == true then
  1026. Thing[1].CFrame = CFrame.new(Thing[1].Position,Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180)))
  1027. end
  1028. else
  1029. Part.Parent=nil
  1030. table.remove(Effects2,e)
  1031. end
  1032. end
  1033. end
  1034. end
  1035. end
  1036. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,Mouse.Hit.p) * CFrame.new(0, 0, 0)
  1037. q = Character:GetChildren()
  1038. for u = 1, #q do
  1039. if q[u].ClassName == "Accessory" or q[u].ClassName == "Hat" then
  1040. q[u]:remove()
  1041. end
  1042. end
  1043. unanchor()
  1044. Humanoid.MaxHealth = "inf"
  1045. Humanoid.Health = "inf"
  1046. if Rooted == false then
  1047. Disable_Jump = false
  1048. Humanoid.WalkSpeed = Speed
  1049. elseif Rooted == true then
  1050. Disable_Jump = true
  1051. Humanoid.WalkSpeed = 0
  1052. end
  1053. end
  1054.  
  1055. --//=================================\\
  1056. --\\=================================//
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062. --//====================================================\\--
  1063. --|| END OF SCRIPT
  1064. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement