Advertisement
StarzoZero

Roblox FE Banish Gun

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