Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.17 KB | None | 0 0
  1. print("By akabob123.leaked by DIVCORE")
  2. wait(1)
  3. Player = game:GetService("Players").LocalPlayer
  4. PlayerGui = Player.PlayerGui
  5. Cam = workspace.CurrentCamera
  6. Backpack = Player.Backpack
  7. Character = Player.Character
  8. Humanoid = Character.Humanoid
  9. RootPart = Character["HumanoidRootPart"]
  10. Torso = Character["Torso"]
  11. Head = Character["Head"]
  12. RightArm = Character["Right Arm"]
  13. LeftArm = Character["Left Arm"]
  14. RightLeg = Character["Right Leg"]
  15. LeftLeg = Character["Left Leg"]
  16. RootJoint = RootPart["RootJoint"]
  17. Neck = Torso["Neck"]
  18. RightShoulder = Torso["Right Shoulder"]
  19. LeftShoulder = Torso["Left Shoulder"]
  20. RightHip = Torso["Right Hip"]
  21. LeftHip = Torso["Left Hip"]
  22. local ANIM = "Idle"
  23. local ATTACK = false
  24. TAUNTING = false
  25. HOLD = false
  26. Frame_Speed = 1/60
  27. local ANIM = "Idle"
  28. Animation_Speed = 3
  29. UNANCHOR = true
  30. local ROBLOXIDLEANIMATION = Instance.new("Animation")
  31. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  32. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  33. local CHANGE = 2 / Animation_Speed
  34. local ANIMATOR = Humanoid.Animator
  35. local ANIMATE = Character.Animate
  36. Intro = true
  37. IT = Instance.new
  38. CF = CFrame.new
  39. VT = Vector3.new
  40. RAD = math.rad
  41. C3 = Color3.new
  42. UD2 = UDim2.new
  43. BRICKC = BrickColor.new
  44. ANGLES = CFrame.Angles
  45. EULER = CFrame.fromEulerAnglesXYZ
  46. COS = math.cos
  47. ACOS = math.acos
  48. SIN = math.sin
  49. ASIN = math.asin
  50. ABS = math.abs
  51. MRANDOM = math.random
  52. FLOOR = math.floor
  53.  
  54. --effects
  55. local Effects = IT("Folder", Character)
  56. Effects.Name = "Effects"
  57. --end effects
  58.  
  59. --c0's
  60. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(-180))
  61. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  62. local RIGHTSHOULDERC0 = CF(1, 0.5, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  63. local LEFTSHOULDERC0 = CF(-1, 0.5, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  64. --c0's
  65.  
  66. -- SAZERENOS' ARTIFICIAL HEARTBEAT
  67.  
  68.  
  69. ArtificialHB = Instance.new("BindableEvent", script)
  70. ArtificialHB.Name = "ArtificialHB"
  71.  
  72. script:WaitForChild("ArtificialHB")
  73.  
  74. frame = Frame_Speed
  75. tf = 0
  76. allowframeloss = false
  77. tossremainder = false
  78. lastframe = tick()
  79. script.ArtificialHB:Fire()
  80.  
  81. game:GetService("RunService").Heartbeat:connect(function(s, p)
  82. tf = tf + s
  83. if tf >= frame then
  84. if allowframeloss then
  85. script.ArtificialHB:Fire()
  86. lastframe = tick()
  87. else
  88. for i = 1, math.floor(tf / frame) do
  89. script.ArtificialHB:Fire()
  90. end
  91. lastframe = tick()
  92. end
  93. if tossremainder then
  94. tf = 0
  95. else
  96. tf = tf - frame * math.floor(tf / frame)
  97. end
  98. end
  99. end)
  100. --end heart beat
  101.  
  102. --really nice to have functions
  103. function CreateParticleEmmiter(PARENT, COLOR1,COLOR2, SIZE1,SIZE2, TEXTUREID, TRANSPARENCY1, TRANSPARENCY2, ZOFFSET, NAME, ACCELERATION, DRAG, LIFETIME1, LIFETIME2, RATE, ROTATION1, ROTATION2, SPEED1, SPEED2, SPREADANGLE)
  104. local prtclemm1 = Instance.new("ParticleEmitter",PARENT)
  105. prtclemm1.Color = ColorSequence.new(COLOR1, COLOR2)
  106. prtclemm1.Size = NumberSequence.new(SIZE1,SIZE2)
  107. prtclemm1.Texture = "http://www.roblox.com/asset/?id="..TEXTUREID
  108. prtclemm1.Transparency = NumberSequence.new(TRANSPARENCY1,TRANSPARENCY2)
  109. prtclemm1.ZOffset = ZOFFSET
  110. prtclemm1.Name = NAME
  111. prtclemm1.Acceleration = ACCELERATION
  112. prtclemm1.Drag = DRAG
  113. prtclemm1.Lifetime = NumberRange.new(LIFETIME1,LIFETIME2)
  114. prtclemm1.Rate = RATE
  115. prtclemm1.Rotation = NumberRange.new(ROTATION1,ROTATION2)
  116. prtclemm1.Speed = NumberRange.new(SPEED1,SPEED2)
  117. prtclemm1.SpreadAngle = SPREADANGLE
  118. return prtclemm1
  119. end
  120.  
  121. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  122. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  123. end
  124.  
  125. function PositiveAngle(NUMBER)
  126. if NUMBER >= 0 then
  127. NUMBER = 0
  128. end
  129. return NUMBER
  130. end
  131.  
  132. function NegativeAngle(NUMBER)
  133. if NUMBER <= 0 then
  134. NUMBER = 0
  135. end
  136. return NUMBER
  137. end
  138.  
  139. function Swait(NUMBER)
  140. if NUMBER == 0 or NUMBER == nil then
  141. ArtificialHB.Event:wait()
  142. else
  143. for i = 1, NUMBER do
  144. ArtificialHB.Event:wait()
  145. end
  146. end
  147. end
  148.  
  149. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  150. local NEWMESH = IT(MESH)
  151. if MESH == "SpecialMesh" then
  152. NEWMESH.MeshType = MESHTYPE
  153. if MESHID ~= "nil" and MESHID ~= "" then
  154. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  155. end
  156. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  157. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  158. end
  159. end
  160. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  161. NEWMESH.Scale = SCALE
  162. NEWMESH.Parent = PARENT
  163. return NEWMESH
  164. end
  165.  
  166. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  167. local NEWPART = IT("Part")
  168. NEWPART.formFactor = FORMFACTOR
  169. NEWPART.Reflectance = REFLECTANCE
  170. NEWPART.Transparency = TRANSPARENCY
  171. NEWPART.CanCollide = false
  172. NEWPART.Locked = true
  173. NEWPART.Anchored = true
  174. if ANCHOR == false then
  175. NEWPART.Anchored = false
  176. end
  177. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  178. NEWPART.Name = NAME
  179. NEWPART.Size = SIZE
  180. NEWPART.Position = Torso.Position
  181. NEWPART.Material = MATERIAL
  182. NEWPART:BreakJoints()
  183. NEWPART.Parent = PARENT
  184. return NEWPART
  185. end
  186. function CreateWedgePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  187. local NEWPART = IT("WedgePart")
  188. NEWPART.formFactor = FORMFACTOR
  189. NEWPART.Reflectance = REFLECTANCE
  190. NEWPART.Transparency = TRANSPARENCY
  191. NEWPART.CanCollide = false
  192. NEWPART.Locked = true
  193. NEWPART.Anchored = true
  194. if ANCHOR == false then
  195. NEWPART.Anchored = false
  196. end
  197. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  198. NEWPART.Name = NAME
  199. NEWPART.Size = SIZE
  200. NEWPART.Position = Torso.Position
  201. NEWPART.Material = MATERIAL
  202. NEWPART:BreakJoints()
  203. NEWPART.Parent = PARENT
  204. return NEWPART
  205. end
  206.  
  207. local function weldBetween(a, b)
  208. local weldd = IT("Weld")
  209. weldd.Part0 = a
  210. weldd.Part1 = b
  211. weldd.C0 = CF()
  212. weldd.C1 = b.CFrame:inverse() * a.CFrame
  213. weldd.Parent = a
  214. return weldd
  215. end
  216.  
  217.  
  218. function QuaternionFromCFrame(cf)
  219. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  220. local trace = m00 + m11 + m22
  221. if trace > 0 then
  222. local s = math.sqrt(1 + trace)
  223. local recip = 0.5 / s
  224. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  225. else
  226. local i = 0
  227. if m11 > m00 then
  228. i = 1
  229. end
  230. if m22 > (i == 0 and m00 or m11) then
  231. i = 2
  232. end
  233. if i == 0 then
  234. local s = math.sqrt(m00 - m11 - m22 + 1)
  235. local recip = 0.5 / s
  236. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  237. elseif i == 1 then
  238. local s = math.sqrt(m11 - m22 - m00 + 1)
  239. local recip = 0.5 / s
  240. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  241. elseif i == 2 then
  242. local s = math.sqrt(m22 - m00 - m11 + 1)
  243. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  244. end
  245. end
  246. end
  247.  
  248. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  249. local xs, ys, zs = x + x, y + y, z + z
  250. local wx, wy, wz = w * xs, w * ys, w * zs
  251. local xx = x * xs
  252. local xy = x * ys
  253. local xz = x * zs
  254. local yy = y * ys
  255. local yz = y * zs
  256. local zz = z * zs
  257. 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))
  258. end
  259.  
  260. function QuaternionSlerp(a, b, t)
  261. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  262. local startInterp, finishInterp;
  263. if cosTheta >= 0.0001 then
  264. if (1 - cosTheta) > 0.0001 then
  265. local theta = ACOS(cosTheta)
  266. local invSinTheta = 1 / SIN(theta)
  267. startInterp = SIN((1 - t) * theta) * invSinTheta
  268. finishInterp = SIN(t * theta) * invSinTheta
  269. else
  270. startInterp = 1 - t
  271. finishInterp = t
  272. end
  273. else
  274. if (1 + cosTheta) > 0.0001 then
  275. local theta = ACOS(-cosTheta)
  276. local invSinTheta = 1 / SIN(theta)
  277. startInterp = SIN((t - 1) * theta) * invSinTheta
  278. finishInterp = SIN(t * theta) * invSinTheta
  279. else
  280. startInterp = t - 1
  281. finishInterp = t
  282. end
  283. end
  284. 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
  285. end
  286.  
  287. function Clerp(a, b, t)
  288. local qa = {QuaternionFromCFrame(a)}
  289. local qb = {QuaternionFromCFrame(b)}
  290. local ax, ay, az = a.x, a.y, a.z
  291. local bx, by, bz = b.x, b.y, b.z
  292. local _t = 1 - t
  293. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  294. end
  295.  
  296. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  297. local frame = IT("Frame")
  298. frame.BackgroundTransparency = TRANSPARENCY
  299. frame.BorderSizePixel = BORDERSIZEPIXEL
  300. frame.Position = POSITION
  301. frame.Size = SIZE
  302. frame.BackgroundColor3 = COLOR
  303. frame.BorderColor3 = BORDERCOLOR
  304. frame.Name = NAME
  305. frame.Parent = PARENT
  306. return frame
  307. end
  308.  
  309. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  310. local label = IT("TextLabel")
  311. label.BackgroundTransparency = 1
  312. label.Size = UD2(1, 0, 1, 0)
  313. label.Position = UD2(0, 0, 0, 0)
  314. label.TextColor3 = TEXTCOLOR
  315. label.TextStrokeTransparency = STROKETRANSPARENCY
  316. label.TextTransparency = TRANSPARENCY
  317. label.FontSize = TEXTFONTSIZE
  318. label.Font = TEXTFONT
  319. label.BorderSizePixel = BORDERSIZEPIXEL
  320. label.TextScaled = false
  321. label.Text = TEXT
  322. label.Name = NAME
  323. label.Parent = PARENT
  324. return label
  325. end
  326.  
  327. function NoOutlines(PART)
  328. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  329. end
  330.  
  331. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  332. local NEWWELD = IT(TYPE)
  333. NEWWELD.Part0 = PART0
  334. NEWWELD.Part1 = PART1
  335. NEWWELD.C0 = C0
  336. NEWWELD.C1 = C1
  337. NEWWELD.Parent = PARENT
  338. return NEWWELD
  339. end
  340.  
  341. local S = IT("Sound")
  342. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  343. local NEWSOUND = nil
  344. coroutine.resume(coroutine.create(function()
  345. NEWSOUND = S:Clone()
  346. NEWSOUND.Parent = PARENT
  347. NEWSOUND.Volume = VOLUME
  348. NEWSOUND.Pitch = PITCH
  349. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  350. NEWSOUND:play()
  351. if DOESLOOP == true then
  352. NEWSOUND.Looped = true
  353. else
  354. repeat wait(1) until NEWSOUND.Playing == false
  355. NEWSOUND:remove()
  356. end
  357. end))
  358. return NEWSOUND
  359. end
  360.  
  361. function CFrameFromTopBack(at, top, back)
  362. local right = top:Cross(back)
  363. 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)
  364. end
  365.  
  366. local BODY = {}
  367. for _, c in pairs(Character:GetDescendants()) do
  368. if c:IsA("BasePart") and c.Name ~= "Handle" then
  369. if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  370. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  371. end
  372. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency,c.Size,c.Name})
  373. elseif c:IsA("JointInstance") then
  374. table.insert(BODY,{c,c.Parent,nil,nil,nil,nil,nil})
  375. end
  376. end
  377. function refit()
  378. Character.Parent = workspace
  379. for e = 1, #BODY do
  380. if BODY[e] ~= nil then
  381. local STUFF = BODY[e]
  382. local PART = STUFF[1]
  383. local PARENT = STUFF[2]
  384. local MATERIAL = STUFF[3]
  385. local COLOR = STUFF[4]
  386. local TRANSPARENCY = STUFF[5]
  387. --local SIZE = STUFF[6]
  388. local NAME = STUFF[7]
  389. if PART.ClassName == "Part" and PART ~= RootPart then
  390. PART.Material = MATERIAL
  391. PART.Transparency = TRANSPARENCY
  392. PART.Name = NAME
  393. end
  394. if PART.Parent ~= PARENT then
  395. Humanoid:remove()
  396. PART.Parent = PARENT
  397. Humanoid = IT("Humanoid",Character)
  398. end
  399. Humanoid.MaxHealth = "inf"
  400. Humanoid.Health = "Inf"
  401. end
  402. end
  403. end
  404. function FindNearestHead(Position, Distance, SinglePlayer)
  405. if SinglePlayer then
  406. return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  407. end
  408. local List = {}
  409. for i, v in pairs(workspace:GetChildren()) do
  410. if v:IsA("Model") and v:findFirstChild("Head") and v ~= Character and Distance >= (v.Head.Position - Position).magnitude then
  411. table.insert(List, v)
  412. end
  413. end
  414. return List
  415. end
  416. -- end functions
  417. --looks
  418. for _, c in pairs(Character:GetChildren()) do
  419. if c.ClassName == "Pants" then
  420. c:remove()
  421. end
  422. if c.ClassName == "Shirt" then
  423. c:remove()
  424. end
  425. if c.ClassName == "Accessory" then
  426. c:remove()
  427. end
  428. if c == Head then
  429. helm = Instance.new("Part")
  430. helm.Size = VT(2,1,1)
  431. helm.Parent = Head
  432. helm.CFrame = Head.CFrame
  433. weldBetween(helm,Head)
  434. helmm = Instance.new("SpecialMesh")
  435. helmm.MeshId = "http://www.roblox.com/asset/?id=18752668"
  436. helmm.TextureId = "http://www.roblox.com/asset/?id=18752665"
  437. helmm.Offset = VT(0,0.5,0)
  438. helmm.Parent = helm
  439. if c:FindFirstChild("face") then
  440. c.face:remove()
  441. end
  442. end
  443. end
  444. kshirt = Instance.new("Shirt")
  445. kshirt.ShirtTemplate = "rbxassetid://177668451"
  446. kshirt.Parent = Character
  447.  
  448.  
  449. kpants = Instance.new("Pants")
  450. kpants.PantsTemplate = "rbxassetid://177668579"
  451. kpants.Parent = Character
  452.  
  453. sword = CreatePart(3, RightArm, "Neon", 0.5, 0, BRICKC("Grey"), "Sword", VT(1,5,1.5/2), false)
  454. CreateMesh("SpecialMesh", sword, "FileMesh", "77403584", "77403631", VT(1,3/2,1.5/2), VT(0,0,0))
  455. CreateWeldOrSnapOrMotor("Weld", sword, RightArm, sword, CF(0,-1,-2) * ANGLES(RAD(175), RAD(0),RAD(90)), CF(0,0,0))
  456.  
  457. --end looks
  458. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  459. WEAPONGUI.Name = "Weapon GUI"
  460. script.Parent = WEAPONGUI
  461. function attack()
  462. Swait()
  463. ATTACK = true
  464. local SwdHitBox = CreatePart(3, RightArm, "Plastic", 0, 1, BRICKC("Really red"), "SwordHitBox", VT(1,4,1), false)
  465. CreateWeldOrSnapOrMotor("Weld", SwdHitBox, RightArm, SwdHitBox, CF(0,-1,-2.5) * ANGLES(RAD(90),RAD(0),RAD(0)), CF(0,0,0))
  466.  
  467. local tuchies = SwdHitBox.Touched:connect(function(Thinghit)
  468. if Thinghit.Name ~= "Base" then
  469. Thinghit:remove()
  470. end
  471. end)
  472. for i = 0,1,0.1 do
  473. Swait()
  474. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(0), RAD(0), RAD(50)), 1/Animation_Speed)
  475. RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-60+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
  476. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(-10 + 3 * COS(SINE/18)), RAD(30 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
  477. RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
  478. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
  479. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(-50)), 1 / Animation_Speed)
  480. end
  481. SwdHitBox:remove()
  482. ATTACK = false
  483. end
  484.  
  485. function FindNearestHead(Position, Distance, SinglePlayer)
  486. if SinglePlayer then
  487. return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  488. end
  489. local List = {}
  490. for i, v in pairs(workspace:GetChildren()) do
  491. if v:IsA("Model") and v:findFirstChild("Head") and v ~= Character and Distance >= (v.Head.Position - Position).magnitude then
  492. table.insert(List, v)
  493. end
  494. end
  495. return List
  496. end
  497.  
  498. function Eviscerate(dude)
  499. if dude.Name ~= Character then
  500. local bgf = IT("BodyGyro", dude.Head)
  501. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(RAD(-90), 0, 0)
  502. local val = IT("BoolValue", dude)
  503. val.Name = "IsHit"
  504. local ds = coroutine.wrap(function()
  505. dude:WaitForChild("Head"):BreakJoints()
  506. wait(0.5)
  507. local target = nil
  508. coroutine.resume(coroutine.create(function()
  509. for i, v in pairs(dude:GetChildren()) do
  510. if v:IsA("Accessory") then
  511. v:Destroy()
  512. end
  513. if v:IsA("Humanoid") then
  514. v:Destroy()
  515. end
  516. if v:IsA("CharacterMesh") then
  517. v:Destroy()
  518. end
  519. if v:IsA("Model") then
  520. v:Destroy()
  521. end
  522. if v:IsA("Part") or v:IsA("MeshPart") then
  523. for x, o in pairs(v:GetChildren()) do
  524. if o:IsA("Decal") then
  525. o:Destroy()
  526. end
  527. end
  528. coroutine.resume(coroutine.create(function()
  529. v.Material = "Neon"
  530. v.CanCollide = false
  531. local PartEmmit1 = IT("ParticleEmitter", v)
  532. PartEmmit1.LightEmission = 1
  533. PartEmmit1.Texture = "rbxassetid://284205403"
  534. PartEmmit1.Color = ColorSequence.new(C3(255,0,0),C3(0,0,0))
  535. PartEmmit1.Rate = 150
  536. PartEmmit1.Lifetime = NumberRange.new(1)
  537. PartEmmit1.Size = NumberSequence.new({
  538. NumberSequenceKeypoint.new(0, 0.75, 0),
  539. NumberSequenceKeypoint.new(1, 0, 0)
  540. })
  541. PartEmmit1.Transparency = NumberSequence.new({
  542. NumberSequenceKeypoint.new(0, 0, 0),
  543. NumberSequenceKeypoint.new(1, 1, 0)
  544. })
  545. PartEmmit1.Speed = NumberRange.new(0, 0)
  546. PartEmmit1.VelocitySpread = 30000
  547. PartEmmit1.Rotation = NumberRange.new(-500, 500)
  548. PartEmmit1.RotSpeed = NumberRange.new(-500, 500)
  549. local BodPoss = IT("BodyPosition", v)
  550. BodPoss.P = 3000
  551. BodPoss.D = 1000
  552. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  553. BodPoss.position = v.Position + Vector3.new(MRANDOM(-15, 15), MRANDOM(-15, 15), MRANDOM(-15, 15))
  554. v.Color = C3(255,255,0)
  555. coroutine.resume(coroutine.create(function()
  556. for i = 0, 49 do
  557. Swait(1)
  558. v.Transparency = v.Transparency + 0.08
  559. end
  560. wait(0.5)
  561. PartEmmit1.Enabled = false
  562. wait(3)
  563. v:Destroy()
  564. dude:Destroy()
  565. end))
  566. end))
  567. end
  568. end
  569. end))
  570. end)
  571. ds()
  572. end
  573. end
  574. local maincolor = BrickColor.new("Bright yellow")
  575. function Magic(bonuspeed, type, pos, scale, value, color, MType)
  576. local type = type
  577. local rng = Instance.new("Part", Character)
  578. rng.Anchored = true
  579. rng.BrickColor = color
  580. rng.CanCollide = false
  581. rng.FormFactor = 3
  582. rng.Name = "Ring"
  583. rng.Material = "Neon"
  584. rng.Size = Vector3.new(1, 1, 1)
  585. rng.Transparency = 0
  586. rng.TopSurface = 0
  587. rng.BottomSurface = 0
  588. rng.CFrame = pos
  589. local rngm = Instance.new("SpecialMesh", rng)
  590. rngm.MeshType = MType
  591. rngm.Scale = scale
  592. local scaler2 = 1
  593. if type == "Add" then
  594. scaler2 = 1 * value
  595. elseif type == "Divide" then
  596. scaler2 = 1 / value
  597. end
  598. coroutine.resume(coroutine.create(function()
  599. for i = 0, 10 / bonuspeed, 0.1 do
  600. Swait()
  601. if type == "Add" then
  602. scaler2 = scaler2 - 0.01 * value / bonuspeed
  603. elseif type == "Divide" then
  604. scaler2 = scaler2 - 0.01 / value * bonuspeed
  605. end
  606. rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  607. rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed)
  608. end
  609. rng:Destroy()
  610. end))
  611. end
  612.  
  613.  
  614.  
  615.  
  616. local crossprt1 = CreatePart(3, LeftArm, "Neon", 0, 0, "Bright yellow", "Cross1", VT(0.2,2,0.2), false)
  617. CreateWeldOrSnapOrMotor("Weld", crossprt1, LeftArm, crossprt1, CF(0,-1.1,-0.25) * ANGLES(RAD(90),RAD(0),RAD(0)), CF(0,0,0))
  618. local crossprt2 = CreatePart(3, LeftArm, "Neon", 0, 0, "Bright yellow", "Cross2", VT(1.3,0.2,0.2), false)
  619. CreateWeldOrSnapOrMotor("Weld", crossprt2, LeftArm, crossprt2, CF(0,-1.1,-0.5) * ANGLES(RAD(0),RAD(0),RAD(0)), CF(0,0,0))
  620.  
  621.  
  622.  
  623. function smite()
  624. ATTACK = true
  625. CreateSound(585548493, Torso, 10, 1, false)
  626. local GYRO = IT("BodyGyro",RootPart)
  627. GYRO.D = 100
  628. GYRO.P = 2000
  629. GYRO.MaxTorque = VT(0,4000000,0)
  630. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  631. wait(0.2)
  632. for i = 0,4,0.1 do
  633. Swait()
  634. GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
  635. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(0), RAD(0), RAD(-90)), 1/Animation_Speed)
  636. RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-10+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
  637. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(-0.4,0 + 0.1 * SIN(SINE/18),0.3) * ANGLES(RAD(-90 + 3 * COS(SINE/18)), RAD(90 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
  638. RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
  639. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
  640. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(50)), 1 / Animation_Speed)
  641. end
  642. Magic(5, "Add", mouse.Hit * CFrame.new(0, -2.9, 0), Vector3.new(0, 0, 0), 1, maincolor, "Sphere")
  643. Magic(10, "Add", mouse.Hit * CFrame.new(0, -2.9, 0), Vector3.new(0, 0, 0), 2, maincolor, "Sphere")
  644. Magic(1, "Add", mouse.Hit, Vector3.new(1, 100000, 1), 0.5, maincolor, "Sphere")
  645. Magic(1, "Add", mouse.Hit, Vector3.new(1, 1, 1), 0.75, maincolor, "Sphere")
  646. CreateSound(858154930, Character, 5, 1, false)
  647. for i, v in pairs(FindNearestHead(mouse.Hit.p, 14.5)) do
  648. if v:FindFirstChild("Head") then
  649. Eviscerate(v)
  650. end
  651. end
  652. GYRO:remove()
  653. ATTACK = false
  654. end
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661. function taunt()
  662. Swait()
  663. ATTACK = true
  664. local DEUSVULT = CreateSound(585548493, Torso, 10, 1, false)
  665. for i = 0,5,0.1 do
  666. Swait()
  667. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(0), RAD(0), RAD(50)), 1/Animation_Speed)
  668. RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(MRANDOM(1,359)),RAD(MRANDOM(1,359)),RAD(MRANDOM(1,360))), 1 / Animation_Speed)
  669. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(MRANDOM(1,359)), RAD(MRANDOM(1,359)), RAD(MRANDOM(1,359))), 1 / Animation_Speed)
  670. RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
  671. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
  672. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(MRANDOM(1,359)),RAD(MRANDOM(1,359)),RAD(MRANDOM(1,359))), 1 / Animation_Speed)
  673. end
  674. ATTACK = false
  675. end
  676. musictime = 0
  677. music = Instance.new("Sound")
  678. music.Parent = Torso
  679. music.Volume = 0
  680. music.Looped = true
  681. music.Pitch = 1
  682. music.Name = "TemplarMusic"
  683. music.SoundId = "rbxassetid://774334527"
  684. music:Play()
  685. musictime = 0
  686. Torso.ChildRemoved:connect(function(removed)
  687. if removed.Name == "TemplarMusic" then
  688. music = Instance.new("Sound")
  689. music.Parent = Torso
  690. music.Volume = 0
  691. music.Looped = true
  692. music.Pitch = 1
  693. music.Name = "TemplarMusic"
  694. music.TimePosition = musictime
  695. music.SoundId = "rbxassetid://774334527"
  696. music:Play()
  697. end
  698. end)
  699. function mute()
  700. if music.Volume ~= 0 then
  701. music.Volume = 0
  702. else
  703. music.Volume = 5
  704. end
  705. end
  706. function volup()
  707. music.Volume = music.Volume + 0.5
  708. end
  709. function Voldown()
  710. music.Volume = music.Volume - 0.5
  711. end
  712.  
  713.  
  714.  
  715. function MouseDown(Mouse)
  716. if ATTACK == false then
  717. attack()
  718. end
  719. end
  720.  
  721. function MouseUp(Mouse)
  722. HOLD = false
  723. end
  724.  
  725. function KeyDown(Key)
  726. KEYHOLD = true
  727. if Key == "t" and ATTACK == false then
  728. taunt()
  729. end
  730. if Key == "m" then
  731. mute()
  732. end
  733. if Key == "n" then
  734. Voldown()
  735. end
  736. if Key == "b" then
  737. volup()
  738. end
  739. if Key == "z" and ATTACK == false then
  740. smite()
  741. end
  742. end
  743.  
  744. function KeyUp(Key)
  745. KEYHOLD = false
  746. end
  747.  
  748. Mouse.Button1Down:connect(function(NEWKEY)
  749. MouseDown(NEWKEY)
  750. end)
  751. Mouse.Button1Up:connect(function(NEWKEY)
  752. MouseUp(NEWKEY)
  753. end)
  754. Mouse.KeyDown:connect(function(NEWKEY)
  755. KeyDown(NEWKEY)
  756. end)
  757. Mouse.KeyUp:connect(function(NEWKEY)
  758. KeyUp(NEWKEY)
  759. end)
  760. --unanchor
  761. function AntiTimeStop()
  762. for _, c in pairs(Character:GetChildren()) do
  763. if c:IsA("BasePart") and c ~= RootPart then
  764. c.Anchored = false
  765. end
  766. end
  767. if UNANCHOR == true then
  768. RootPart.Anchored = false
  769. else
  770. RootPart.Anchored = true
  771. end
  772. end
  773. --unanchor
  774. SINE = 0
  775.  
  776. while true do
  777. Humanoid.HipHeight = 0
  778. ANIMATE.Parent = nil
  779. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  780. v:Stop();
  781. end
  782. Swait()
  783. SINE = SINE + CHANGE
  784. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  785. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  786. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  787. if TORSOVELOCITY < 1 and HITFLOOR ~= nil and ATTACK ~= true then
  788. ANIM = "Idle"
  789. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(0), RAD(0), RAD(50)), 1/Animation_Speed)
  790. RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-10+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
  791. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(-10 + 3 * COS(SINE/18)), RAD(30 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
  792. RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
  793. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
  794. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(-50)), 1 / Animation_Speed)
  795. end
  796. if TORSOVELOCITY > 1 and HITFLOOR ~= nil and ATTACK ~= true then
  797. ANIM = "Walk"
  798. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,-0.1,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(10), RAD(0), RAD(0)), 1/Animation_Speed)
  799. RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(-0.3, -0.5 - 0.1 * SIN(SINE/12),0.5) * ANGLES(RAD(-90),RAD(0),RAD(-30+1 *COS(SINE/6))), 1 / Animation_Speed)
  800. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0,0 + 0.1 * SIN(SINE/12),0) * ANGLES(RAD(0), RAD(0), RAD(3*10*COS(SINE/6))), 1 / Animation_Speed)
  801. RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.2 * COS(SINE/6),0 + 0.3 *SIN(SINE/6)) * ANGLES(RAD(10 * 2 * COS(SINE/6)), RAD(90), RAD(0)), 1 / Animation_Speed)
  802. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 + 0.2 * COS(SINE/6),0 - 0.3 *SIN(SINE/6)) * ANGLES(RAD(-10 * 2 * COS(SINE/6)), RAD(-90), RAD(0)), 1 / Animation_Speed)
  803. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(0)), 1 / Animation_Speed)
  804. end
  805. if TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  806. ANIM = "Fall"
  807. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 1/Animation_Speed)
  808. RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-10+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
  809. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(-10 + 3 * COS(SINE/18)), RAD(30 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
  810. RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
  811. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
  812. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(0)), 1 / Animation_Speed)
  813. end
  814. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  815. ANIM = "Jump"
  816. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(10), RAD(0), RAD(0)), 1/Animation_Speed)
  817. RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-10+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
  818. LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(-10 + 3 * COS(SINE/18)), RAD(30 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
  819. RightHip.C0 = Clerp(RightHip.C0, CF(1,-0.5 - 0.03 * SIN(SINE/18),-0.5) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
  820. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-0.5 - 0.03 * SIN(SINE/18),-0.5) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
  821. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(0)), 1 / Animation_Speed)
  822. end
  823. AntiTimeStop()
  824. refit()
  825. musictime = music.TimePosition
  826. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement