Advertisement
Basykung7845

Cream

Feb 27th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.90 KB | None | 0 0
  1. -- This script has been converted to FE by Basykung7845
  2.  
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. do
  6. print("FE Compatibility code by Basykung7845")
  7. print("For a New friend :p")
  8. script.Parent = Player.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,Connect=function(self,f)self.Function=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()}
  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 and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. wait(0.2)
  88.  
  89. Player = owner
  90. PlayerGui = Player.PlayerGui
  91. Cam = workspace.CurrentCamera
  92. Backpack = Player.Backpack
  93. Character = Player.Character
  94. Humanoid = Character.Humanoid
  95. RootPart = Character["HumanoidRootPart"]
  96. Torso = Character["Torso"]
  97. Head = Character["Head"]
  98. RightArm = Character["Right Arm"]
  99. LeftArm = Character["Left Arm"]
  100. RightLeg = Character["Right Leg"]
  101. LeftLeg = Character["Left Leg"]
  102. RootJoint = RootPart["RootJoint"]
  103. Neck = Torso["Neck"]
  104. RightShoulder = Torso["Right Shoulder"]
  105. LeftShoulder = Torso["Left Shoulder"]
  106. RightHip = Torso["Right Hip"]
  107. LeftHip = Torso["Left Hip"]
  108. local TIME = 0
  109. local sick = Instance.new("Sound",Torso)
  110.  
  111. IT = Instance.new
  112. CF = CFrame.new
  113. VT = Vector3.new
  114. RAD = math.rad
  115. C3 = Color3.new
  116. UD2 = UDim2.new
  117. BRICKC = BrickColor.new
  118. ANGLES = CFrame.Angles
  119. EULER = CFrame.fromEulerAnglesXYZ
  120. COS = math.cos
  121. ACOS = math.acos
  122. SIN = math.sin
  123. ASIN = math.asin
  124. ABS = math.abs
  125. MRANDOM = math.random
  126. FLOOR = math.floor
  127.  
  128. --//=================================\\
  129. --|| USEFUL VALUES
  130. --\\=================================//
  131.  
  132. Animation_Speed = 3
  133. local FORCERESET = false
  134. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  135. local Speed = 16
  136. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  137. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  138. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  139. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  140. local DAMAGEMULTIPLIER = 1
  141. local ANIM = "Idle"
  142. local ATTACK = false
  143. local EQUIPPED = false
  144. local HOLD = false
  145. local COMBO = 1
  146. local Rooted = false
  147. local SINE = 0
  148. local KEYHOLD = false
  149. local CHANGE = 2 / Animation_Speed
  150. local WALKINGANIM = false
  151. local VALUE1 = false
  152. local VALUE2 = false
  153. local ROBLOXIDLEANIMATION = IT("Animation")
  154. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  155. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  156. --ROBLOXIDLEANIMATION.Parent = Humanoid
  157. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  158. WEAPONGUI.Name = "BanishV3Gui"
  159. local Weapon = IT("Model")
  160. Weapon.Name = "Adds"
  161. local Effects = IT("Folder", Weapon)
  162. Effects.Name = "Effects"
  163. local ANIMATOR = Humanoid.Animator
  164. local ANIMATE = Character:FindFirstChild("Animate")
  165. local UNANCHOR = true
  166. local TOBANISH = {}
  167. script.Parent = PlayerGui
  168.  
  169. --//=================================\\
  170. --\\=================================//
  171.  
  172.  
  173. --//=================================\\
  174. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  175. --\\=================================//
  176.  
  177. ArtificialHB = Instance.new("BindableEvent", script)
  178. ArtificialHB.Name = "ArtificialHB"
  179.  
  180. script:WaitForChild("ArtificialHB")
  181.  
  182. frame = Frame_Speed
  183. tf = 0
  184. allowframeloss = false
  185. tossremainder = false
  186. lastframe = tick()
  187. script.ArtificialHB:Fire()
  188.  
  189. game:GetService("RunService").Heartbeat:connect(function(s, p)
  190. tf = tf + s
  191. if tf >= frame then
  192. if allowframeloss then
  193. script.ArtificialHB:Fire()
  194. lastframe = tick()
  195. else
  196. for i = 1, math.floor(tf / frame) do
  197. script.ArtificialHB:Fire()
  198. end
  199. lastframe = tick()
  200. end
  201. if tossremainder then
  202. tf = 0
  203. else
  204. tf = tf - frame * math.floor(tf / frame)
  205. end
  206. end
  207. end)
  208.  
  209. --//=================================\\
  210. --\\=================================//
  211.  
  212. --//=================================\\
  213. --|| SOME FUNCTIONS
  214. --\\=================================//
  215.  
  216. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  217. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  218. end
  219.  
  220. function PositiveAngle(NUMBER)
  221. if NUMBER >= 0 then
  222. NUMBER = 0
  223. end
  224. return NUMBER
  225. end
  226.  
  227. function NegativeAngle(NUMBER)
  228. if NUMBER <= 0 then
  229. NUMBER = 0
  230. end
  231. return NUMBER
  232. end
  233.  
  234. function Swait(NUMBER)
  235. if NUMBER == 0 or NUMBER == nil then
  236. ArtificialHB.Event:wait()
  237. else
  238. for i = 1, NUMBER do
  239. ArtificialHB.Event:wait()
  240. end
  241. end
  242. end
  243.  
  244. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  245. local NEWMESH = IT(MESH)
  246. if MESH == "SpecialMesh" then
  247. NEWMESH.MeshType = MESHTYPE
  248. if MESHID ~= "nil" and MESHID ~= "" then
  249. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  250. end
  251. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  252. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  253. end
  254. end
  255. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  256. NEWMESH.Scale = SCALE
  257. NEWMESH.Parent = PARENT
  258. return NEWMESH
  259. end
  260.  
  261. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  262. local NEWPART = IT("Part")
  263. NEWPART.formFactor = FORMFACTOR
  264. NEWPART.Reflectance = REFLECTANCE
  265. NEWPART.Transparency = TRANSPARENCY
  266. NEWPART.CanCollide = false
  267. NEWPART.Locked = true
  268. NEWPART.Anchored = true
  269. if ANCHOR == false then
  270. NEWPART.Anchored = false
  271. end
  272. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  273. NEWPART.Name = NAME
  274. NEWPART.Size = SIZE
  275. NEWPART.Position = Torso.Position
  276. NEWPART.Material = MATERIAL
  277. NEWPART:BreakJoints()
  278. NEWPART.Parent = PARENT
  279. return NEWPART
  280. end
  281.  
  282. local function weldBetween(a, b)
  283. local weldd = Instance.new("ManualWeld")
  284. weldd.Part0 = a
  285. weldd.Part1 = b
  286. weldd.C0 = CFrame.new()
  287. weldd.C1 = b.CFrame:inverse() * a.CFrame
  288. weldd.Parent = a
  289. return weldd
  290. end
  291.  
  292.  
  293. function QuaternionFromCFrame(cf)
  294. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  295. local trace = m00 + m11 + m22
  296. if trace > 0 then
  297. local s = math.sqrt(1 + trace)
  298. local recip = 0.5 / s
  299. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  300. else
  301. local i = 0
  302. if m11 > m00 then
  303. i = 1
  304. end
  305. if m22 > (i == 0 and m00 or m11) then
  306. i = 2
  307. end
  308. if i == 0 then
  309. local s = math.sqrt(m00 - m11 - m22 + 1)
  310. local recip = 0.5 / s
  311. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  312. elseif i == 1 then
  313. local s = math.sqrt(m11 - m22 - m00 + 1)
  314. local recip = 0.5 / s
  315. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  316. elseif i == 2 then
  317. local s = math.sqrt(m22 - m00 - m11 + 1)
  318. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  319. end
  320. end
  321. end
  322.  
  323. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  324. local xs, ys, zs = x + x, y + y, z + z
  325. local wx, wy, wz = w * xs, w * ys, w * zs
  326. local xx = x * xs
  327. local xy = x * ys
  328. local xz = x * zs
  329. local yy = y * ys
  330. local yz = y * zs
  331. local zz = z * zs
  332. 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))
  333. end
  334.  
  335. function QuaternionSlerp(a, b, t)
  336. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  337. local startInterp, finishInterp;
  338. if cosTheta >= 0.0001 then
  339. if (1 - cosTheta) > 0.0001 then
  340. local theta = ACOS(cosTheta)
  341. local invSinTheta = 1 / SIN(theta)
  342. startInterp = SIN((1 - t) * theta) * invSinTheta
  343. finishInterp = SIN(t * theta) * invSinTheta
  344. else
  345. startInterp = 1 - t
  346. finishInterp = t
  347. end
  348. else
  349. if (1 + cosTheta) > 0.0001 then
  350. local theta = ACOS(-cosTheta)
  351. local invSinTheta = 1 / SIN(theta)
  352. startInterp = SIN((t - 1) * theta) * invSinTheta
  353. finishInterp = SIN(t * theta) * invSinTheta
  354. else
  355. startInterp = t - 1
  356. finishInterp = t
  357. end
  358. end
  359. 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
  360. end
  361.  
  362. function Clerp(a, b, t)
  363. local qa = {QuaternionFromCFrame(a)}
  364. local qb = {QuaternionFromCFrame(b)}
  365. local ax, ay, az = a.x, a.y, a.z
  366. local bx, by, bz = b.x, b.y, b.z
  367. local _t = 1 - t
  368. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  369. end
  370.  
  371. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  372. local frame = IT("Frame")
  373. frame.BackgroundTransparency = TRANSPARENCY
  374. frame.BorderSizePixel = BORDERSIZEPIXEL
  375. frame.Position = POSITION
  376. frame.Size = SIZE
  377. frame.BackgroundColor3 = COLOR
  378. frame.BorderColor3 = BORDERCOLOR
  379. frame.Name = NAME
  380. frame.Parent = PARENT
  381. return frame
  382. end
  383.  
  384. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  385. local label = IT("TextLabel")
  386. label.BackgroundTransparency = 1
  387. label.Size = UD2(1, 0, 1, 0)
  388. label.Position = UD2(0, 0, 0, 0)
  389. label.TextColor3 = TEXTCOLOR
  390. label.TextStrokeTransparency = STROKETRANSPARENCY
  391. label.TextTransparency = TRANSPARENCY
  392. label.FontSize = TEXTFONTSIZE
  393. label.Font = TEXTFONT
  394. label.BorderSizePixel = BORDERSIZEPIXEL
  395. label.TextScaled = false
  396. label.Text = TEXT
  397. label.Name = NAME
  398. label.Parent = PARENT
  399. return label
  400. end
  401.  
  402. function NoOutlines(PART)
  403. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  404. end
  405.  
  406. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  407. local NEWWELD = IT(TYPE)
  408. NEWWELD.Part0 = PART0
  409. NEWWELD.Part1 = PART1
  410. NEWWELD.C0 = C0
  411. NEWWELD.C1 = C1
  412. NEWWELD.Parent = PARENT
  413. return NEWWELD
  414. end
  415.  
  416. local S = IT("Sound")
  417. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  418. local NEWSOUND = nil
  419. coroutine.resume(coroutine.create(function()
  420. NEWSOUND = S:Clone()
  421. NEWSOUND.Parent = PARENT
  422. NEWSOUND.Volume = VOLUME
  423. NEWSOUND.Pitch = PITCH
  424. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  425. NEWSOUND:play()
  426. if DOESLOOP == true then
  427. NEWSOUND.Looped = true
  428. else
  429. repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
  430. NEWSOUND:remove()
  431. end
  432. end))
  433. return NEWSOUND
  434. end
  435.  
  436. function CFrameFromTopBack(at, top, back)
  437. local right = top:Cross(back)
  438. 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)
  439. end
  440.  
  441. --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})
  442. function WACKYEFFECT(Table)
  443. local TYPE = (Table.EffectType or "Sphere")
  444. local SIZE = (Table.Size or VT(1,1,1))
  445. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  446. local TRANSPARENCY = (Table.Transparency or 0)
  447. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  448. local CFRAME = (Table.CFrame or Torso.CFrame)
  449. local MOVEDIRECTION = (Table.MoveToPos or nil)
  450. local ROTATION1 = (Table.RotationX or 0)
  451. local ROTATION2 = (Table.RotationY or 0)
  452. local ROTATION3 = (Table.RotationZ or 0)
  453. local MATERIAL = (Table.Material or "Neon")
  454. local COLOR = (Table.Color or C3(1,1,1))
  455. local TIME = (Table.Time or 45)
  456. local SOUNDID = (Table.SoundID or nil)
  457. local SOUNDPITCH = (Table.SoundPitch or nil)
  458. local SOUNDVOLUME = (Table.SoundVolume or nil)
  459. coroutine.resume(coroutine.create(function()
  460. local PLAYSSOUND = false
  461. local SOUND = nil
  462. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  463. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  464. PLAYSSOUND = true
  465. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  466. end
  467. EFFECT.Color = COLOR
  468. local MSH = nil
  469. if TYPE == "Sphere" then
  470. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  471. elseif TYPE == "Block" then
  472. MSH = IT("BlockMesh",EFFECT)
  473. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  474. elseif TYPE == "Wave" then
  475. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  476. elseif TYPE == "Ring" then
  477. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  478. elseif TYPE == "Slash" then
  479. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  480. elseif TYPE == "Round Slash" then
  481. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  482. elseif TYPE == "Swirl" then
  483. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  484. elseif TYPE == "Skull" then
  485. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  486. elseif TYPE == "Crystal" then
  487. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  488. end
  489. if MSH ~= nil then
  490. local MOVESPEED = nil
  491. if MOVEDIRECTION ~= nil then
  492. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  493. end
  494. local GROWTH = SIZE - ENDSIZE
  495. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  496. if TYPE == "Block" then
  497. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  498. else
  499. EFFECT.CFrame = CFRAME
  500. end
  501. for LOOP = 1, TIME+1 do
  502. Swait()
  503. MSH.Scale = MSH.Scale - GROWTH/TIME
  504. if TYPE == "Wave" then
  505. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  506. end
  507. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  508. if TYPE == "Block" then
  509. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  510. else
  511. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  512. end
  513. if MOVEDIRECTION ~= nil then
  514. local ORI = EFFECT.Orientation
  515. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  516. EFFECT.Orientation = ORI
  517. end
  518. end
  519. if PLAYSSOUND == false then
  520. EFFECT:remove()
  521. else
  522. SOUND.Stopped:Connect(function()
  523. EFFECT:remove()
  524. end)
  525. end
  526. else
  527. if PLAYSSOUND == false then
  528. EFFECT:remove()
  529. else
  530. repeat Swait() until SOUND.Playing == false
  531. EFFECT:remove()
  532. end
  533. end
  534. end))
  535. end
  536.  
  537. function MakeForm(PART,TYPE)
  538. if TYPE == "Cyl" then
  539. local MSH = IT("CylinderMesh",PART)
  540. elseif TYPE == "Ball" then
  541. local MSH = IT("SpecialMesh",PART)
  542. MSH.MeshType = "Sphere"
  543. elseif TYPE == "Wedge" then
  544. local MSH = IT("SpecialMesh",PART)
  545. MSH.MeshType = "Wedge"
  546. end
  547. end
  548.  
  549. function SpawnTrail(FROM,TO,BIG)
  550. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
  551. MakeForm(TRAIL,"Cyl")
  552. local DIST = (FROM - TO).Magnitude
  553. if BIG == true then
  554. TRAIL.Size = VT(0.5,DIST,0.5)
  555. else
  556. TRAIL.Size = VT(0.25,DIST,0.25)
  557. end
  558. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  559. coroutine.resume(coroutine.create(function()
  560. for i = 1, 5 do
  561. Swait()
  562. TRAIL.Transparency = TRAIL.Transparency + 0.1
  563. end
  564. TRAIL:remove()
  565. end))
  566. end
  567.  
  568. Debris = game:GetService("Debris")
  569.  
  570. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  571. local DIRECTION = CF(StartPos,EndPos).lookVector
  572. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  573. end
  574.  
  575. function turnto(position)
  576. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  577. end
  578.  
  579. --//=================================\\
  580. --|| WEAPON CREATION
  581. --\\=================================//
  582.  
  583. local Particle = IT("ParticleEmitter",nil)
  584. Particle.Enabled = false
  585. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
  586. Particle.LightEmission = 0.5
  587. Particle.Rate = 150
  588. Particle.ZOffset = 0.2
  589. Particle.Rotation = NumberRange.new(-180, 180)
  590. Particle.RotSpeed = NumberRange.new(-180, 180)
  591. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  592. Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0))
  593.  
  594. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  595. function ParticleEmitter(Table)
  596. local PRTCL = Particle:Clone()
  597. local Speed = Table.Speed or 5
  598. local Drag = Table.Drag or 0
  599. local Size1 = Table.Size1 or 1
  600. local Size2 = Table.Size2 or 5
  601. local Lifetime1 = Table.Lifetime1 or 1
  602. local Lifetime2 = Table.Lifetime2 or 1.5
  603. local Parent = Table.Parent or Torso
  604. local Emit = Table.Emit or 100
  605. local Offset = Table.Offset or 360
  606. local Acel = Table.Acel or VT(0,0,0)
  607. local Enabled = Table.Enabled or false
  608. PRTCL.Parent = Parent
  609. PRTCL.Size = NumberSequence.new(Size1,Size2)
  610. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  611. PRTCL.Speed = NumberRange.new(Speed)
  612. PRTCL.VelocitySpread = Offset
  613. PRTCL.Drag = Drag
  614. PRTCL.Acceleration = Acel
  615. if Enabled == false then
  616. PRTCL:Emit(Emit)
  617. Debris:AddItem(PRTCL,Lifetime2)
  618. else
  619. PRTCL.Enabled = true
  620. end
  621. return PRTCL
  622. end
  623.  
  624. local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.6,0.2),false)
  625. local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0))
  626. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
  627. MakeForm(Part,"Wedge")
  628. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
  629. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.3,0.2),false)
  630. MakeForm(Part,"Wedge")
  631. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0))
  632. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.3,0.3),false)
  633. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  634. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.5,0.5),false)
  635. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  636. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false)
  637. MakeForm(Part,"Cyl")
  638. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  639. for i = 1, 8 do
  640. local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false)
  641. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
  642. end
  643. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.38,0.41,0.38),false)
  644. MakeForm(Part,"Cyl")
  645. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  646. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.37,0.5,0.37),false)
  647. MakeForm(Part,"Ball")
  648. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  649. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.7,0.4),false)
  650. MakeForm(Part,"Wedge")
  651. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0))
  652. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.4,0.2),false)
  653. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  654. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.35,0.35,0.35),false)
  655. MakeForm(Part,"Cyl")
  656. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  657. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.5),false)
  658. MakeForm(Part,"Cyl")
  659. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  660. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.45),false)
  661. MakeForm(Part,"Cyl")
  662. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  663. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
  664. MakeForm(Part,"Wedge")
  665. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
  666. local LASTPART = Handle
  667. for i = 1, 10 do
  668. if LASTPART == Handle then
  669. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.2,0),false)
  670. LASTPART = Part
  671. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  672. else
  673. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.05,0),false)
  674. CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0))
  675. LASTPART = Part
  676. end
  677. end
  678.  
  679. local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.15,2,0.15),false)
  680. MakeForm(Barrel,"Cyl")
  681. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  682. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.25,1,0.25),false)
  683. MakeForm(Part,"Cyl")
  684. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0))
  685. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0.1,0.2),false)
  686. MakeForm(Part,"Wedge")
  687. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
  688. local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.125,0,0.125),false)
  689. MakeForm(Hole,"Cyl")
  690. CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0))
  691. local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0,0),false)
  692. local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  693. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2))
  694. local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Mid gray", "Eye", VT(0,0,0),false)
  695. local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
  696. CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2))
  697. coroutine.resume(coroutine.create(function()
  698. while wait() do
  699. GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5))
  700. GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5))
  701. end
  702. end))
  703.  
  704. ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.1, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.5, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  705. --ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 0.2, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.7, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
  706.  
  707. for _, c in pairs(Weapon:GetDescendants()) do
  708. if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
  709. c.Material = "Glass"
  710. c.Color = C3(0,0,0)
  711. elseif c.ClassName == "Part" and c.Name == "Eye" then
  712. c.Color = C3(1,0,0)
  713. c.Material = "Neon"
  714. end
  715. end
  716.  
  717. Weapon.Parent = Character
  718. for _, c in pairs(Weapon:GetChildren()) do
  719. if c.ClassName == "Part" then
  720. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  721. end
  722. end
  723.  
  724. local SKILLTEXTCOLOR = C3(1,0,0)
  725. local SKILLFONT = "Antique"
  726. local SKILLTEXTSIZE = 7
  727.  
  728. Humanoid.Died:connect(function()
  729. ATTACK = true
  730. end)
  731.  
  732. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.1, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  733. --[[local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.63, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  734. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.215, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  735. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.525, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  736. local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  737. ]]
  738. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Banish Bullet", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 1")
  739. --[[local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Ability 2", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 2")
  740. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 3")
  741. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 4")
  742. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Mercy", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 5")
  743. ]]
  744. function printbye(Name)
  745. local MESSAGES = {"You cannot struggle, ","Your existance is an insult, ","Fade, ","Your existance is not desired, ","You are not permitted here, ","You are not to decide your fate, ","Be gone, ","You are already dead, ","Your live is an anomaly, ","Don't dare to return, ","Why are you resisting, ","You cannot exist here, ","Why are you struggling, ","Your fate was already decided, ","Goodbye, ","You cannot ignore my command, ","You cannot resist my command, ","You already died, "}
  746. warn(MESSAGES[MRANDOM(1,#MESSAGES)]..Name..".")
  747. end
  748.  
  749. workspace.ChildAdded:connect(function(instance)
  750. for BANISH = 1, #TOBANISH do
  751. if TOBANISH[BANISH] ~= nil then
  752. if instance.Name == TOBANISH[BANISH] then
  753. coroutine.resume(coroutine.create(function()
  754. printbye(instance.Name)
  755. instance:ClearAllChildren()
  756. Debris:AddItem(instance,0.0005)
  757. end))
  758. end
  759. end
  760. end
  761. end)
  762.  
  763. --//=================================\\
  764. --|| DAMAGING
  765. --\\=================================//
  766.  
  767. function Banish(Foe)
  768. if Foe then
  769. coroutine.resume(coroutine.create(function()
  770. --if game.Players:FindFirstChild(Foe.Name) then
  771. table.insert(TOBANISH,Foe.Name)
  772. printbye(Foe.Name)
  773. --end
  774. Foe.Archivable = true
  775. local CLONE = Foe:Clone()
  776. Foe:Destroy()
  777. CLONE.Parent = Effects
  778. CLONE:BreakJoints()
  779. local MATERIALS = {"Glass","Neon"}
  780. for _, c in pairs(CLONE:GetDescendants()) do
  781. if c:IsA("BasePart") then
  782. if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then
  783. CreateSound(340722848, c, 10, 1, false)
  784. end
  785. c.Anchored = true
  786. c.Transparency = c.Transparency + 0.2
  787. c.Material = MATERIALS[MRANDOM(1,2)]
  788. c.Color = C3(1,0,0)
  789. if c.ClassName == "MeshPart" then
  790. c.TextureID = ""
  791. end
  792. if c:FindFirstChildOfClass("SpecialMesh") then
  793. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  794. end
  795. if c:FindFirstChildOfClass("Decal") then
  796. c:FindFirstChildOfClass("Decal"):remove()
  797. end
  798. c.Name = "Banished"
  799. c.CanCollide = false
  800. else
  801. c:remove()
  802. end
  803. end
  804. local A = false
  805. for i = 1, 35 do
  806. if A == false then
  807. A = true
  808. elseif A == true then
  809. A = false
  810. end
  811. for _, c in pairs(CLONE:GetDescendants()) do
  812. if c:IsA("BasePart") then
  813. c.Anchored = true
  814. c.Material = MATERIALS[MRANDOM(1,2)]
  815. c.Transparency = c.Transparency + 0.8/35
  816. if A == false then
  817. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  818. elseif A == true then
  819. c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
  820. end
  821. end
  822. end
  823. Swait()
  824. end
  825. CLONE:remove()
  826. end))
  827. end
  828. end
  829.  
  830. function ApplyAoE(POSITION,RANGE,ISBANISH)
  831. local CHILDREN = workspace:GetDescendants()
  832. for index, CHILD in pairs(CHILDREN) do
  833. if CHILD.ClassName == "Model" and CHILD ~= Character then
  834. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  835. if HUM then
  836. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  837. if TORSO then
  838. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  839. if ISBANISH == true then
  840. Banish(CHILD)
  841. else
  842. if ISBANISH == "Gravity" then
  843. HUM.PlatformStand = true
  844. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  845. local grav = Instance.new("BodyPosition",TORSO)
  846. grav.D = 15
  847. grav.P = 20000
  848. grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  849. grav.position = TORSO.Position
  850. grav.Name = "V3BanishForce"..Player.Name
  851. else
  852. TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0)
  853. TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25))
  854. end
  855. else
  856. HUM.PlatformStand = false
  857. end
  858. end
  859. elseif ISBANISH == "Gravity" then
  860. if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
  861. TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove()
  862. HUM.PlatformStand = false
  863. end
  864. end
  865. end
  866. end
  867. end
  868. end
  869. end
  870.  
  871. --//=================================\\
  872. --|| ATTACK FUNCTIONS AND STUFF
  873. --\\=================================//
  874.  
  875. function Shot()
  876. ATTACK = true
  877. Rooted = false
  878. for i=0, 0.4, 0.1 / Animation_Speed do
  879. Swait()
  880. turnto(Mouse.Hit.p)
  881. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  882. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
  883. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  884. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  885. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  886. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  887. end
  888. repeat
  889. for i=0, 0.2, 0.1 / Animation_Speed do
  890. Swait()
  891. turnto(Mouse.Hit.p)
  892. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  893. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
  894. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  895. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  896. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  897. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  898. end
  899. local HIT,POS = CastProperRay(Hole.Position, Mouse.Hit.p, 1000, Character)
  900. SpawnTrail(Hole.Position,POS)
  901. if HIT ~= nil then
  902. if HIT.Parent ~= workspace and HIT.Parent.ClassName ~= "Folder" then
  903. Banish(HIT.Parent)
  904. end
  905. end
  906. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(1,1.5,1), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = Hole.CFrame*CF(0,0.5,0).p, RotationX = 0, RotationY = -15, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  907. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 904440937, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  908. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  909. WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
  910. for i=0, 0.3, 0.1 / Animation_Speed do
  911. Swait()
  912. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
  913. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.25 / Animation_Speed)
  914. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  915. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  916. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  917. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  918. end
  919. until KEYHOLD == false
  920. ATTACK = false
  921. Rooted = false
  922. end
  923.  
  924. function AttackTemplate()
  925. ATTACK = true
  926. Rooted = false
  927. for i=0, 1, 0.1 / Animation_Speed do
  928. Swait()
  929. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  930. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  931. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  932. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  933. 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.15 / Animation_Speed)
  934. 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.15 / Animation_Speed)
  935. end
  936. ATTACK = false
  937. Rooted = false
  938. end
  939.  
  940. --//=================================\\
  941. --|| ASSIGN THINGS TO KEYS
  942. --\\=================================//
  943.  
  944. function MouseDown(Mouse)
  945. if ATTACK == false then
  946. end
  947. end
  948.  
  949. function MouseUp(Mouse)
  950. HOLD = false
  951. end
  952.  
  953. function KeyDown(Key)
  954. KEYHOLD = true
  955. if Key == "z" and ATTACK == false then
  956. Shot()
  957. end
  958.  
  959. if Key == "b" and ATTACK == false then
  960. end
  961.  
  962. if Key == "c" and ATTACK == false then
  963. end
  964.  
  965. if Key == "v" and ATTACK == false then
  966. end
  967.  
  968. if Key == "x" and ATTACK == false then
  969. end
  970. end
  971.  
  972. function KeyUp(Key)
  973. KEYHOLD = false
  974. end
  975.  
  976. Mouse.Button1Down:connect(function(NEWKEY)
  977. MouseDown(NEWKEY)
  978. end)
  979. Mouse.Button1Up:connect(function(NEWKEY)
  980. MouseUp(NEWKEY)
  981. end)
  982. Mouse.KeyDown:connect(function(NEWKEY)
  983. KeyDown(NEWKEY)
  984. end)
  985. Mouse.KeyUp:connect(function(NEWKEY)
  986. KeyUp(NEWKEY)
  987. end)
  988.  
  989. --//=================================\\
  990. --\\=================================//
  991.  
  992.  
  993. function unanchor()
  994. if UNANCHOR == true then
  995. g = Character:GetChildren()
  996. for i = 1, #g do
  997. if g[i].ClassName == "Part" then
  998. g[i].Anchored = false
  999. end
  1000. end
  1001. end
  1002. end
  1003.  
  1004.  
  1005. --//=================================\\
  1006. --|| WRAP THE WHOLE SCRIPT UP
  1007. --\\=================================//
  1008.  
  1009. Humanoid.Changed:connect(function(Jump)
  1010. if Jump == "Jump" and (Disable_Jump == true) then
  1011. Humanoid.Jump = false
  1012. end
  1013. end)
  1014.  
  1015. local CONNECT = nil
  1016.  
  1017. while true do
  1018. Swait()
  1019. ANIMATE.Parent = nil
  1020. if Character:FindFirstChildOfClass("Humanoid") == nil then
  1021. Humanoid = IT("Humanoid",Character)
  1022. end
  1023. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1024. v:Stop();
  1025. end
  1026. SINE = SINE + CHANGE
  1027. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1028. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1029. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1030. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1031. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1032. 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)
  1033. 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)
  1034. 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)
  1035. 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)
  1036. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1037. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1038. 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)
  1039. 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)
  1040. 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)
  1041. end
  1042. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1043. ANIM = "Jump"
  1044. if ATTACK == false then
  1045. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1046. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1047. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1048. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1049. 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)
  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.2 / Animation_Speed)
  1051. end
  1052. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1053. ANIM = "Fall"
  1054. if ATTACK == false then
  1055. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1056. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1057. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1058. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1059. 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)
  1060. 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)
  1061. end
  1062. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1063. ANIM = "Idle"
  1064. if ATTACK == false then
  1065. 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)
  1066. 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)
  1067. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.5) * ANGLES(RAD(75), RAD(45), RAD(-25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1068. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1069. 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)
  1070. 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)
  1071. end
  1072. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1073. ANIM = "Walk"
  1074. if ATTACK == false then
  1075. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1076. 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)
  1077. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.1, -0.4) * ANGLES(RAD(150), RAD(0), RAD(0))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1078. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  1079. 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)
  1080. 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)
  1081. end
  1082. end
  1083. unanchor()
  1084. Humanoid.MaxHealth = "inf"
  1085. Humanoid.Health = "inf"
  1086. if Rooted == false then
  1087. Disable_Jump = false
  1088. Humanoid.WalkSpeed = Speed
  1089. elseif Rooted == true then
  1090. Disable_Jump = true
  1091. Humanoid.WalkSpeed = 0
  1092. end
  1093. sick.Parent = Torso
  1094. sick:resume()
  1095. sick.Volume = 8.2
  1096. sick.Pitch = 1
  1097. sick.SoundId = "rbxassetid://900318768"
  1098. sick.Name = "Dead"
  1099. end
  1100.  
  1101. --//=================================\\
  1102. --\\=================================//
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108. --//====================================================\\--
  1109. --|| END OF SCRIPT
  1110. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement