Advertisement
bmrx13

duelist

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