Advertisement
memberhero

Oversoul Test

May 5th, 2018
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.24 KB | None | 0 0
  1. --i used stravants Beautifier so it might look a bit wonky
  2. Meshes = {
  3. Blast = '20329976',
  4. Crown = '1323306',
  5. Ring = '3270017',
  6. Claw = '10681506',
  7. Crystal = '9756362',
  8. Coil = '9753878',
  9. Cloud = '1095708',
  10. }
  11. clangsounds = {
  12. '199149119',
  13. '199149109',
  14. '199149072',
  15. '199149025',
  16. '199148971'
  17. }
  18. hitsounds = {
  19. '199149137',
  20. '199149186',
  21. '199149221',
  22. '199149235',
  23. '199149269',
  24. '199149297'
  25. }
  26. blocksounds = {
  27. '199148933',
  28. '199148947'
  29. }
  30. armorsounds = {
  31. '199149321',
  32. '199149338',
  33. '199149367',
  34. '199149409',
  35. '199149452'
  36. }
  37. woosh = {
  38. Heavy1 = '320557353',
  39. Heavy2 = '320557382',
  40. Heavy3 = '320557453',
  41. Heavy4 = '199144226',
  42. Heavy5 = '203691447',
  43. Heavy6 = '203691467',
  44. Heavy7 = '203691492',
  45. Light1 = '320557413',
  46. Light2 = '320557487',
  47. Light3 = '199145095',
  48. Light4 = '199145146',
  49. Light5 = '199145887',
  50. Light6 = '199145913',
  51. Light7 = '199145841',
  52. Medium1 = '320557518',
  53. Medium2 = '320557537',
  54. Medium3 = '320557563',
  55. Medium4 = '199145204'
  56. }
  57. music = {--i like music a lot
  58. Breaking = '179281636',
  59. FinalReckoning = '357375770',
  60. NotDeadYet = '346175829',
  61. Intense = '151514610',
  62. JumpP1 = '160536628',
  63. JumpP2 = '60536666',
  64. SonsOfWar = '158929777',
  65. WrathOfSea = '165520893',
  66. ProtecTorsofEarth = '160542922',
  67. SkyTitans = '179282324',
  68. ArchAngel = '144043274',
  69. Anticipation = '168614529',
  70. TheMartyred = '186849544',
  71. AwakeP1 = '335631255',
  72. AwakeP2 = '335631297',
  73. ReadyAimFireP1 = '342455387',
  74. ReadyAimFireP2 = '342455399',
  75. DarkLordP1 = '209567483',
  76. DarkLordP2 = '209567529',
  77. BloodDrainP1 = '162914123',
  78. BloodDrainP2 = '162914203',
  79. DanceOfSwords = '320473062',
  80. Opal = '286415112',
  81. Calamity = '190454307',
  82. Hypnotica = '155968128',
  83. Nemisis = '160453802',
  84. Breathe = '276963903',
  85. GateToTheRift = '270655227',
  86. InfernalBeserking = '244143404',
  87. Trust = '246184492',
  88. AwakeningTheProject = '245121821',
  89. BloodPain = '242545577',
  90. Chaos = '247241693',
  91. NightmareFictionHighStake = '248062278',
  92. TheWhiteWeapon = '247236446',
  93. Gale = '256851659',
  94. ImperialCode = '256848383',
  95. Blitzkrieg = '306431437',
  96. RhapsodyRage = '348690251',
  97. TheGodFist = '348541501',
  98. BattleForSoul = '321185592',
  99. TheDarkColossus = '305976780',
  100. EmpireOfAngels = '302580452',
  101. Kronos = '302205297',
  102. Exorcist = '299796054',
  103. CrimsonFlames = '297799220',
  104. UltimatePower = '295753229',
  105. DrivingInTheDark = '295753229',
  106. AscendToPower = '293860654',
  107. GodOfTheSun = '293612495',
  108. DarkRider = '293861765',
  109. Vengeance = '293375555',
  110. SoundOfWar = '293376196',
  111. HellsCrusaders = '293012202',
  112. Legend = '293011823',
  113. RisingSouls = '290524959'
  114. }
  115. misc = {
  116. GroundSlam = '199145477',
  117. LaserSlash = '199145497',
  118. RailGunFire = '199145534',
  119. Charge1 = '199145659',
  120. Charge2 = '169380469',
  121. Charge3 = '169380479',
  122. EmptyGun = '203691822',
  123. GunShoot = '203691837',
  124. Stomp1 = '200632875',
  125. Stomp2 = '200632561',
  126. TelsaCannonCharge = '169445572',
  127. TelsaCannonShoot = '169445602',
  128. AncientHymm = '245313442'
  129. }
  130. wait(1 / 60)
  131. local Player = game.Players.localPlayer
  132. local Character = Player.Character
  133. local Humanoid = Character.Humanoid
  134. local mouse = Player:GetMouse()
  135. local m = Instance.new('Model', Character)
  136. m.Name = "WeaponModel"
  137. local LeftArm = Character["Left Arm"]
  138. local RightArm = Character["Right Arm"]
  139. local LeftLeg = Character["Left Leg"]
  140. local RightLeg = Character["Right Leg"]
  141. local Head = Character.Head
  142. local Torso = Character.Torso
  143. local cam = game.Workspace.CurrentCamera
  144. local RootPart = Character.HumanoidRootPart
  145. local RootJoint = RootPart.RootJoint
  146. --cam.CameraSubject = Head
  147. local equipped = false
  148. local attack = false
  149. local Anim = 'Idle'
  150. local idle = 0
  151. local sprint = false
  152. local battlestance = false
  153. local attacktype = 1
  154. local state = 'none'
  155. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  156. local velocity = RootPart.Velocity.y
  157. local sine = 0
  158. local change = 1
  159. local on = false
  160. local grabbed = false
  161. local skill1 = false
  162. local skill2 = false
  163. local skill3 = false
  164. local skill4 = false
  165. local cooldown1 = 0
  166. local cooldown2 = 0
  167. local cooldown3 = 0
  168. local cooldown4 = 0
  169. local co1 = 10--how long it will take for skill to cooldown
  170. local co2 = 15
  171. local co3 = 15
  172. local co4 = 25
  173. local inputserv = game:GetService('UserInputService')
  174. local typing = false
  175. local crit = false
  176. local critchance = 2--critical chance percentage
  177. local critdamageaddmin = 3--minimum amount of critical damage being added to regular damage
  178. local critdamageaddmax = 7--maximum amount
  179. local maxstamina = 100--max amount of stamina
  180. local stamina = 0--stamina you start out with
  181. local skill1stam = 10--how much stamina is needed for a skill
  182. local skill2stam = 10
  183. local skill3stam = 20
  184. local skill4stam = 30
  185. local recovermana = 3--how much mana per second
  186. local defensevalue = 1--how much defense this character has
  187. local speedvalue = 1--how much speed this character has
  188. --speed is 16*speedvalue
  189. local mindamage = 5--self explanatory
  190. local maxdamage = 7--self explanatory
  191. local damagevalue = 1--how much damage this character has
  192. --damage is math.random(mindamage,maxdamage)*damagevalue
  193. --damage(hit, mindamage, maxdamage, 1, 1, RootPart)
  194. --asd
  195. local cn = CFrame.new-- make things easier :)
  196. local mr = math.rad
  197. local angles = CFrame.Angles
  198. local ud = UDim2.new
  199. local c3 = Color3.new
  200. local skillcolorscheme = c3(1, 1, 1)--color scheme for skills lol
  201. --asd
  202. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  203. ---Humanoid.Animator:Destroy()
  204. ---Character.Animate:Destroy()
  205. hip = Instance.new("Motor6D",Character.Torso)
  206. hip.Name = "Right Hip"
  207. hip2 = Instance.new("Motor6D",Character.Torso)
  208. hip2.Name = "Left Hip"
  209. wait(1)
  210. --Angles For RootJoint And Hips `~`
  211. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  212. local RHCF = CFrame.fromEulerAnglesXYZ(0,1.6,0)
  213. local LHCF = CFrame.fromEulerAnglesXYZ(0,-1.6,0)
  214. --Save Shoulders/Hips
  215. RSH, LSH = nil, nil
  216. --Shoulders
  217. RW = Instance.new("Weld")
  218. LW = Instance.new("Weld")
  219. --Hips
  220. RH = cn.Torso["Right Hip"]
  221. LH = cn.Torso["Left Hip"]
  222. --
  223. Player = Player
  224. ch = Character
  225. RSH = cn.Torso["Right Shoulder"]
  226. LSH = cn.Torso["Left Shoulder"]
  227. --
  228. RSH.Parent = nil
  229. LSH.Parent = nil
  230. --
  231. RW.Name = "RW"
  232. RW.Part0 = ch.Torso
  233. RW.C0 = cn(1.5, 0.5, 0)
  234. RW.C1 = cn(0, 0.5, 0)
  235. RW.Part1 = ch["Right Arm"]
  236. RW.Parent = ch.Torso
  237. --
  238. LW.Name = "LW"
  239. LW.Part0 = ch.Torso
  240. LW.C0 = cn(-1.5, 0.5, 0)
  241. LW.C1 = cn(0, 0.5, 0)
  242. LW.Part1 = ch["Left Arm"]
  243. LW.Parent = ch.Torso
  244.  
  245. local scrn = Instance.new('ScreenGui', Player.PlayerGui)
  246. function makeframe(par, trans, pos, size, color)
  247. local frame = Instance.new('Frame', par)
  248. frame.BackgroundTransparency = trans
  249. frame.BorderSizePixel = 0
  250. frame.Position = pos
  251. frame.Size = size
  252. frame.BackgroundColor3 = color
  253. return frame
  254. end
  255. function makelabel(par, text)
  256. local label = Instance.new('TextLabel', par)
  257. label.BackgroundTransparency = 1
  258. label.Size = ud(1, 0, 1, 0)
  259. label.Position = ud(0, 0, 0, 0)
  260. label.TextColor3 = c3(255, 255, 255)
  261. label.TextStrokeTransparency = 0
  262. label.FontSize = Enum.FontSize.Size32
  263. label.Font = Enum.Font.SourceSansBold
  264. label.BorderSizePixel = 0
  265. label.TextScaled = true
  266. label.Text = text
  267. end
  268. framesk1 = makeframe(scrn, .5, ud(.23, 0, .93, 0), ud(.26, 0, .06, 0), skillcolorscheme)
  269. framesk2 = makeframe(scrn, .5, ud(.5, 0, .93, 0), ud(.26, 0, .06, 0), skillcolorscheme)
  270. framesk3 = makeframe(scrn, .5, ud(.5, 0, .86, 0), ud(.26, 0, .06, 0), skillcolorscheme)
  271. framesk4 = makeframe(scrn, .5, ud(.23, 0, .86, 0), ud(.26, 0, .06, 0), skillcolorscheme)
  272. bar1 = makeframe(framesk1, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), skillcolorscheme)
  273. bar2 = makeframe(framesk2, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), skillcolorscheme)
  274. bar3 = makeframe(framesk3, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), skillcolorscheme)
  275. bar4 = makeframe(framesk4, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), skillcolorscheme)
  276. text1 = makelabel(framesk1, '[3] Skill3')
  277. text2 = makelabel(framesk2, '[4] Skill4')
  278. text3 = makelabel(framesk3, "[2] Skill2")
  279. text4 = makelabel(framesk4, '[1] Skill1')
  280. staminabar = makeframe(scrn, .5, ud(.23, 0, .82, 0), ud(.26, 0, .03, 0), c3(61 / 255, 171 / 255, 1))
  281. staminacover = makeframe(staminabar, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), c3(61 / 255, 171 / 255, 1))
  282. staminatext = makelabel(staminabar, 'Mana')
  283. healthbar = makeframe(scrn, .5, ud(.5, 0, .82, 0), ud(.26, 0, .03, 0), c3(1, 1, 0))
  284. healthcover = makeframe(healthbar, 0, ud(0, 0, 0, 0), ud(1, 0, 1, 0), c3(1, 46 / 255, 49 / 255))
  285. healthtext = makelabel(healthbar, 'Health')
  286.  
  287. local stats = Instance.new('Folder', Character)
  288. stats.Name = 'Stats'
  289. local block = Instance.new('BoolValue', stats)
  290. block.Name = 'Block'
  291. block.Value = false
  292. local stun = Instance.new('BoolValue', stats)
  293. stun.Name = 'Stun'
  294. stun.Value = false
  295. local defense = Instance.new('NumberValue', stats)
  296. defense.Name = 'Defence'
  297. defense.Value = defensevalue
  298. local speed = Instance.new('NumberValue', stats)
  299. speed.Name = 'Speed'
  300. speed.Value = speedvalue
  301. local damagea = Instance.new('NumberValue', stats)
  302. damagea.Name = 'Damage'
  303. damagea.Value = damagevalue
  304.  
  305. function atktype(s, e)
  306. coroutine.resume(coroutine.create(function()
  307. attacktype = e
  308. wait(1.5)
  309. attacktype = s
  310. end))
  311. end
  312.  
  313. function turncrit()
  314. coroutine.resume(coroutine.create(function()
  315. print'CRITICAL!'
  316. crit = true
  317. wait(.25)
  318. crit = false
  319. end))
  320. end
  321.  
  322. function subtractstamina(k)
  323. if stamina >= k then
  324. stamina = stamina - k
  325. end
  326. end
  327.  
  328. function clerp(a, b, t)
  329. return a:lerp(b, t)
  330. end
  331.  
  332. function randomizer(percent)
  333. local randomized = math.random(0, 100)
  334. if randomized <= percent then
  335. return true
  336. elseif randomized >= percent then
  337. return false
  338. end
  339. end
  340.  
  341. local RbxUtility = LoadLibrary("RbxUtility")
  342. local Create = RbxUtility.Create
  343.  
  344. function RemoveOutlines(part)
  345. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  346. end
  347.  
  348. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  349. local Part = Create("Part"){
  350. formFactor = FormFactor,
  351. Parent = Parent,
  352. Reflectance = Reflectance,
  353. Transparency = Transparency,
  354. CanCollide = false,
  355. Locked = true,
  356. BrickColor = BrickColor.new(tostring(BColor)),
  357. Name = Name,
  358. Size = Size,
  359. Material = Material,
  360. }
  361. RemoveOutlines(Part)
  362. return Part
  363. end
  364.  
  365. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  366. local Msh = Create(Mesh){
  367. Parent = Part,
  368. Offset = OffSet,
  369. Scale = Scale,
  370. }
  371. if Mesh == "SpecialMesh" then
  372. Msh.MeshType = MeshType
  373. Msh.MeshId = MeshId
  374. end
  375. return Msh
  376. end
  377.  
  378. function CreateWeld(Parent, Part0, Part1, C0, C1)
  379. local Weld = Create("Weld"){
  380. Parent = Parent,
  381. Part0 = Part0,
  382. Part1 = Part1,
  383. C0 = C0,
  384. C1 = C1,
  385. }
  386. return Weld
  387. end
  388.  
  389. function rayCast(pos, dir, maxl, ignore)
  390. return game:service("Workspace"):FindPartOnRay(Ray.new(pos, dir.unit * (maxl or 999.999)), ignore)
  391. end
  392. --Effects
  393. function makeeffect(par, size, pos1, trans, trans1, howmuch, delay1, id, type)
  394. local p = Instance.new('Part', par or workspace)
  395. p.CFrame = pos1
  396. p.Anchored = true
  397. p.Material = 'SmoothPlastic'
  398. p.CanCollide = false
  399. p.TopSurface = 0
  400. p.Size = Vector3.new(1, 1, 1)
  401. p.BottomSurface = 0
  402. p.Transparency = trans
  403. p.FormFactor = 'Custom'
  404. RemoveOutlines(p)
  405. local mesh = Instance.new('SpecialMesh', p)
  406. mesh.Scale = size
  407. if id ~= nil and type == nil then
  408. mesh.MeshId = 'rbxassetid://'..id
  409. elseif id == nil and type ~= nil then
  410. mesh.MeshType = type
  411. elseif id == nil and type == nil then
  412. mesh.MeshType = 'Brick'
  413. end
  414. coroutine.wrap(function()
  415. for i = 0, delay1, .1 do
  416. wait(1 / 60)
  417. p.CFrame = p.CFrame
  418. mesh.Scale = mesh.Scale + howmuch
  419. p.Transparency = p.Transparency + trans1
  420. end
  421. p:Destroy()
  422. end)()
  423. return p
  424. end
  425. function clangy(cframe)
  426. wait(1 / 60)
  427. local clang = {}
  428. local dis = 0
  429. local part = Instance.new('Part', nil)
  430. part.CFrame = cframe
  431. part.Anchored = true
  432. part.CanCollide = false
  433. part.BrickColor = BrickColor.new('New Yeller')
  434. part.FormFactor = 'Custom'
  435. part.Name = 'clanger'
  436. part.Size = Vector3.new(.2, .2, .2)
  437. part.TopSurface = 10
  438. part.BottomSurface = 10
  439. part.RightSurface = 10
  440. part.LeftSurface = 10
  441. part.BackSurface = 10
  442. part.FrontSurface = 10
  443. --part.Material='Neon'
  444. part:BreakJoints()
  445. local mesh = Instance.new('BlockMesh', part)
  446. coroutine.wrap(function()
  447. for i = 1, 7 do
  448. wait(1 / 60)
  449. dis = dis + .2
  450. local partc = part:clone()
  451. partc.Parent = workspace
  452. partc.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(dis, 0, 0)
  453. partc.CFrame = partc.CFrame * CFrame.new(0, dis, 0)
  454. table.insert(clang, partc)
  455. end
  456. for i, v in pairs(clang) do
  457. coroutine.wrap(function()
  458. for i = 1, 10 do
  459. wait(.01)
  460. v.Transparency = v.Transparency + .1
  461. end
  462. v:destroy()
  463. end)()
  464. end
  465. end)()
  466. end
  467. --damage effects
  468. function circle(color, pos1)
  469. local p = Instance.new('Part', m)
  470. p.BrickColor = BrickColor.new(color)
  471. p.CFrame = pos1
  472. p.Anchored = true
  473. p.Material = 'Plastic'
  474. p.CanCollide = false
  475. p.TopSurface = 0
  476. p.Size = Vector3.new(1, 1, 1)
  477. p.BottomSurface = 0
  478. p.Transparency = 0.35
  479. p.FormFactor = 'Custom'
  480. local mesh = Instance.new('CylinderMesh', p)
  481. mesh.Scale = Vector3.new(0, 0, 0)
  482. coroutine.wrap(function()
  483. for i = 0, 5, .1 do
  484. wait(1 / 60)
  485. p.CFrame = p.CFrame
  486. mesh.Scale = mesh.Scale + Vector3.new(.5, 0, .5)
  487. p.Transparency = p.Transparency + .025
  488. end
  489. p:Destroy()
  490. end)()
  491. end
  492. function firespaz1(color, pos1)
  493. local p = Instance.new('Part', m)
  494. p.BrickColor = BrickColor.new(color)
  495. p.CFrame = pos1
  496. p.Anchored = true
  497. p.Material = 'Plastic'
  498. p.CanCollide = false
  499. p.TopSurface = 0
  500. p.Size = Vector3.new(1, 1, 1)
  501. p.BottomSurface = 0
  502. p.Transparency = 0.5
  503. p.FormFactor = 'Custom'
  504. local mesh = Instance.new('BlockMesh', p)
  505. mesh.Scale = Vector3.new(1, 1, 1)
  506. coroutine.wrap(function()
  507. for i = 0, 15, .1 do
  508. wait(1 / 30)
  509. p.CFrame = p.CFrame * CFrame.new(0, .1, 0)
  510. mesh.Scale = mesh.Scale - Vector3.new(.1, .1, .1)
  511. p.Transparency = p.Transparency + .025
  512. end
  513. p:Destroy()
  514. end)()
  515. end
  516.  
  517. function pickrandom(tablesa)
  518. local randomized = tablesa[math.random(1, #tablesa)]
  519. return randomized
  520. end
  521. function sound(id, pitch, volume, par, last)
  522. local s = Instance.new('Sound', par or Torso)
  523. s.SoundId = 'rbxassetid://'..id
  524. s.Pitch = pitch or 1
  525. s.Volume = volume or 1
  526. wait()
  527. s:play()
  528. game.Debris:AddItem(s, last or 120)
  529. end
  530. function clangy(cframe)
  531. wait(1 / 60)
  532. local clang = {}
  533. local dis = 0
  534. local part = Instance.new('Part', nil)
  535. part.CFrame = cframe
  536. part.Anchored = true
  537. part.CanCollide = false
  538. part.BrickColor = BrickColor.new('New Yeller')
  539. part.FormFactor = 'Custom'
  540. part.Name = 'clanger'
  541. part.Size = Vector3.new(.2, .2, .2)
  542. part.TopSurface = 10
  543. part.BottomSurface = 10
  544. part.RightSurface = 10
  545. part.LeftSurface = 10
  546. part.BackSurface = 10
  547. part.FrontSurface = 10
  548. --part.Material='Neon'
  549. part:BreakJoints()
  550. local mesh = Instance.new('BlockMesh', part)
  551. coroutine.wrap(function()
  552. for i = 1, 7 do
  553. wait(1 / 60)
  554. dis = dis + .2
  555. local partc = part:clone()
  556. partc.Parent = workspace
  557. partc.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(dis, 0, 0)
  558. partc.CFrame = partc.CFrame * CFrame.new(0, dis, 0)
  559. table.insert(clang, partc)
  560. end
  561. for i, v in pairs(clang) do
  562. coroutine.wrap(function()
  563. for i = 1, 10 do
  564. wait(.01)
  565. v.Transparency = v.Transparency + .1
  566. end
  567. v:destroy()
  568. end)()
  569. end
  570. end)()
  571. end
  572. --damage effects
  573. --Effects
  574. so = function(id, par, vol, pit)
  575. coroutine.resume(coroutine.create(function()
  576. local sou = Instance.new("Sound", par or workspace)
  577. sou.Volume = vol
  578. sou.Pitch = pit or 1
  579. sou.SoundId = id
  580. wait()
  581. sou:play()
  582. game:GetService("Debris"):AddItem(sou, 6)
  583. end))
  584. end
  585.  
  586. local function getclosest(obj, distance)
  587. local last, lastx = distance + 1
  588. for i, v in pairs(workspace:GetChildren()) do
  589. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  590. local t = v.Torso
  591. local dist = (t.Position - obj.Position).magnitude
  592. if dist <= distance then
  593. if dist < last then
  594. last = dist
  595. lastx = v
  596. end
  597. end
  598. end
  599. end
  600. return lastx
  601. end
  602.  
  603. function makegui(cframe, text)
  604. local a = math.random(-10, 10) / 100
  605. local c = Instance.new("Part")
  606. c.Transparency = 1
  607. Instance.new("BodyGyro").Parent = c
  608. c.Parent = m
  609. c.CFrame = CFrame.new(cframe.p + Vector3.new(0, 1.5, 0))
  610. local f = Instance.new("BodyPosition")
  611. f.P = 2000
  612. f.D = 100
  613. f.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  614. f.position = c.Position + Vector3.new(0, 3, 0)
  615. f.Parent = c
  616. game:GetService("Debris"):AddItem(c, .5 + 6)
  617. c.CanCollide = false
  618. m.Parent = workspace
  619. c.CanCollide = false
  620. local bg = Instance.new('BillboardGui', m)
  621. bg.Adornee = c
  622. bg.Size = UDim2.new(1, 0, 1, 0)
  623. bg.StudsOffset = Vector3.new(0, 0, 0)
  624. bg.AlwaysOnTop = false
  625. local tl = Instance.new('TextLabel', bg)
  626. tl.BackgroundTransparency = 1
  627. tl.Size = UDim2.new(1, 0, 1, 0)
  628. tl.Text = text
  629. tl.Font = 'SourceSansBold'
  630. tl.FontSize = 'Size42'
  631. if crit == true then
  632. tl.TextColor3 = Color3.new(180 / 255, 0, 0)
  633. else
  634. tl.TextColor3 = Color3.new(255, 180 / 255, 51 / 255)
  635. end
  636. tl.TextStrokeTransparency = 0
  637. tl.TextScaled = true
  638. tl.TextWrapped = true
  639. coroutine.wrap(function()
  640. wait(2)
  641. for i = 1, 10 do
  642. wait()
  643. tl.TextTransparency = tl.TextTransparency + .1
  644. end
  645. end)()
  646. end
  647.  
  648. function tag(hum, Player)
  649. local creator = Instance.new('ObjectValue', hum)
  650. creator.Value = Player
  651. creator.Name = 'creator'
  652. end
  653. function untag(hum)
  654. if hum ~= nil then
  655. local tag = hum:findFirstChild("creator")
  656. if tag ~= nil then
  657. tag.Parent = nil
  658. end
  659. end
  660. end
  661.  
  662. function tagPlayer(h)
  663. coroutine.wrap(function()
  664. tag(h, Player)
  665. wait(1)
  666. untag(h)
  667. end)()
  668. end
  669. function damage(hit, mind, maxd, knock, type, prop)
  670. --[[
  671. to apply it to a Player directly, make the first arg go to the Players Torso
  672. 1 - normal type(damage and knockback)
  673. 2 - drain type(damage no knockback)
  674. 3 - lifesteal(absorbs hp) crit does not have an effect on how much life is absorbed
  675. 4 - heal(heals target)
  676. 5 - subtracts enemies defense
  677. 6 - subtracts enemies speed
  678. 7 -
  679. ]]
  680. if hit.Name:lower() == 'Hitbox' then
  681. local pos = CFrame.new(0, 1, -1)
  682. sound(pickrandom(clangsounds), math.random(100, 150) / 100, 1, Torso, 6)
  683. coroutine.wrap(function()
  684. for i = 1, 4 do
  685. clangy(Torso.CFrame * pos * CFrame.Angles(0, math.rad(math.random(0, 360)), 0))
  686. end
  687. end)()
  688. end
  689. if hit.Parent == nil then
  690. return
  691. end
  692. local h = hit.Parent:FindFirstChild("Humanoid")
  693. for i, v in pairs(hit.Parent:children()) do
  694. if v:IsA("Humanoid") then
  695. h = v
  696. end
  697. end
  698. if hit.Parent.Parent:FindFirstChild('Torso') ~= nil then
  699. h = hit.Parent.Parent:FindFirstChild('Humanoid')
  700. end
  701. if hit.Parent:IsA('Hat') then
  702. hit = hit.Parent.Parent:findFirstChild('Head')
  703. end
  704. local D = math.random(mind, maxd) * damagea.Value
  705. if h.Parent:FindFirstChild('Stats') then
  706. D = D / h.Parent:FindFirstChild('Stats').Defence.Value
  707. elseif not h.Parent:FindFirstChild('Stats') then
  708. D = D
  709. end
  710. if h then
  711. makegui(h.Parent.Head.CFrame, tostring(math.floor(D + .5)))
  712. end
  713. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  714. if type == 1 then
  715. tagPlayer(h)
  716. local asd = randomizer(critchance)
  717. if asd == true then
  718. turncrit()
  719. end
  720. if crit == false then
  721. h.Health = h.Health - D
  722. else
  723. h.Health = h.Health - (D + math.random(critdamageaddmin, critdamageaddmax))
  724. end
  725. so("http://www.roblox.com/asset/?id=169462037", hit, 1, math.random(150, 200) / 100)
  726. local vp = Instance.new('BodyVelocity')
  727. vp.P = 500
  728. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  729. vp.velocity = prop.CFrame.lookVector * knock + prop.Velocity / 1.05
  730. if knock > 0 then
  731. vp.Parent = hit.Parent.Torso
  732. end
  733. game:GetService("Debris"):AddItem(vp, .5)
  734. elseif type == 2 then
  735. so("http://www.roblox.com/asset/?id=169462037", hit, 1, math.random(150, 200) / 100)
  736. local asd = randomizer(critchance)
  737. if asd == true then
  738. turncrit()
  739. end
  740. if crit == false then
  741. h.Health = h.Health - D
  742. else
  743. h.Health = h.Health - (D + math.random(critdamageaddmin, critdamageaddmax))
  744. end
  745. tagPlayer(h)
  746. elseif type == 3 then
  747. tagPlayer(h)
  748. local asd = randomizer(critchance)
  749. if asd == true then
  750. turncrit()
  751. end
  752. if crit == false then
  753. h.Health = h.Health - D
  754. else
  755. h.Health = h.Health - (D + math.random(critdamageaddmin, critdamageaddmax))
  756. end
  757. Character.Humanoid.Health = Character.Humanoid.Health + D / 2
  758. so("http://www.roblox.com/asset/?id=206083232", hit, 1, 1.5)
  759. for i = 1, 10 do
  760. firespaz1('Bright red', hit.CFrame * CFrame.Angles(math.random(0, 3), math.random(0, 3), math.random(0, 3)))
  761. end
  762. elseif type == 4 then
  763. h.Health = h.Health + D
  764. so("http://www.roblox.com/asset/?id=186883084", hit, 1, 1)
  765. circle('Dark green', h.Parent.Torso.CFrame * CFrame.new(0, -2.5, 0))
  766. end
  767. end
  768. end
  769.  
  770. function subtrackstamina(k)
  771. if stamina >= k then
  772. stamina = stamina - k
  773. end
  774. end
  775.  
  776. mouse.Button1Down:connect(function()
  777. end)
  778.  
  779. mouse.KeyDown:connect(function(k)
  780. k = k:lower()
  781. end)
  782.  
  783.  
  784. inputserv.InputBegan:connect(function(k)
  785. if k.KeyCode == Enum.KeyCode.One and typing == false and cooldown3 >= co1 and stamina >= skill1stam then
  786. elseif k.KeyCode == Enum.KeyCode.Two and typing == false and cooldown3 >= co2 and stamina >= skill2stam then
  787. elseif k.KeyCode == Enum.KeyCode.Three and typing == false and cooldown3 >= co3 and stamina >= skill3stam then
  788. elseif k.KeyCode == Enum.KeyCode.Four and typing == false and cooldown3 >= co4 and stamina >= skill4stam then
  789. end
  790. end)
  791.  
  792. inputserv.InputBegan:connect(function(k)
  793. if k.KeyCode == Enum.KeyCode.Slash then
  794. local fin = nil
  795. typing = true
  796. fin = inputserv.InputBegan:connect(function(k)
  797. if k.KeyCode == Enum.KeyCode.Return or k.UserInputType == Enum.UserInputType.MouseButton1 then
  798. typing = false
  799. fin:disconnect()
  800. end
  801. end)
  802. end
  803. end)
  804.  
  805. function updateskills()
  806. if cooldown1 <= co1 then
  807. cooldown1 = cooldown1 + 1 / 30
  808. end
  809. if cooldown2 <= co2 then
  810. cooldown2 = cooldown2 + 1 / 30
  811. end
  812. if cooldown3 <= co3 then
  813. cooldown3 = cooldown3 + 1 / 30
  814. end
  815. if cooldown4 <= co4 then
  816. cooldown4 = cooldown4 + 1 / 30
  817. end
  818. if stamina <= maxstamina then
  819. stamina = stamina + recovermana / 30
  820. end
  821. end
  822.  
  823. game:GetService'RunService'.Heartbeat:connect(function()
  824. updateskills()
  825. healthcover:TweenSize(ud(1 * (Character.Humanoid.Health / Character.Humanoid.MaxHealth), 0, 1, 0), 'Out', 'Quad', .5)
  826. staminacover:TweenSize(ud(1 * (stamina / maxstamina), 0, 1, 0), 'Out', 'Quad', .5)
  827. bar4:TweenSize(ud(1 * (cooldown1 / co1), 0, 1, 0), 'Out', 'Quad', .5)
  828. bar3:TweenSize(ud(1 * (cooldown2 / co2), 0, 1, 0), 'Out', 'Quad', .5)
  829. bar1:TweenSize(ud(1 * (cooldown3 / co3), 0, 1, 0), 'Out', 'Quad', .5)
  830. bar2:TweenSize(ud(1 * (cooldown4 / co4), 0, 1, 0), 'Out', 'Quad', .5)
  831. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  832. velocity = RootPart.Velocity.y
  833. sine = sine + change
  834. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  835. Character.Humanoid.WalkSpeed = 16 * speed.Value
  836. if equipped == true or equipped == false then
  837. if RootPart.Velocity.y > 1 and hit == nil and stun.Value ~= true then
  838. Anim = "Jump"
  839. if attack == false then
  840. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  841. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  842. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  843. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  844. RH.C0=clerp(RH.C0,cn(1,-1,0)*RHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  845. LH.C0=clerp(LH.C0,cn(-1,-1,0)*LHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  846. end
  847. elseif RootPart.Velocity.y < -1 and hit == nil and stun.Value ~= true then
  848. Anim = "Fall"
  849. if attack == false then
  850. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  851. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  852. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  853. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  854. RH.C0=clerp(RH.C0,cn(1,-1,0)*RHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  855. LH.C0=clerp(LH.C0,cn(-1,-1,0)*LHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  856. end
  857. elseif Torsovelocity < 1 and hit ~= nil and stun.Value ~= true then
  858. Anim = "Idle"
  859. if attack == false then
  860. change = 1
  861. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  862. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  863. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  864. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  865. RH.C0=clerp(RH.C0,cn(1,-1,0)*RHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  866. LH.C0=clerp(LH.C0,cn(-1,-1,0)*LHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  867. end
  868. elseif Torsovelocity > 2 and hit ~= nil and stun.Value ~= true then
  869. Anim = "Walk"
  870. if attack == false then
  871. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  872. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  873. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  874. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  875. RH.C0=clerp(RH.C0,cn(1,-1,0)*RHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  876. LH.C0=clerp(LH.C0,cn(-1,-1,0)*LHCF*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  877. end
  878. end
  879. end
  880. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement