Advertisement
Orangeplayer1431

made it new

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