Advertisement
sneakydodge123

sweep

Aug 2nd, 2018
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.73 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  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 Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  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.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145. CV="White"
  146.  
  147. p = game.Players.LocalPlayer
  148. char = p.Character
  149. local txt = Instance.new("BillboardGui", char)
  150. txt.Adornee = char .Head
  151. txt.Name = "_status"
  152. txt.Size = UDim2.new(2, 0, 1.2, 0)
  153. txt.StudsOffset = Vector3.new(-9, 8, 0)
  154. local text = Instance.new("TextLabel", txt)
  155. text.Size = UDim2.new(10, 0, 7, 0)
  156. text.FontSize = "Size24"
  157. text.TextScaled = true
  158. text.TextTransparency = 0
  159. text.BackgroundTransparency = 1
  160. text.TextTransparency = 0
  161. text.TextStrokeTransparency = 1
  162. text.Font = "Arcade"
  163. text.TextStrokeColor3 = Color3.new(0,0,255)
  164.  
  165. v=Instance.new("Part")
  166. v.Name = "ColorBrick"
  167. v.Parent=p.Character
  168. v.FormFactor="Symmetric"
  169. v.Anchored=true
  170. v.CanCollide=false
  171. v.BottomSurface="Smooth"
  172. v.TopSurface="Smooth"
  173. v.Size=Vector3.new(10,5,3)
  174. v.Transparency=1
  175. v.CFrame=char.Torso.CFrame
  176. v.BrickColor=BrickColor.new(CV)
  177. v.Transparency=1
  178. text.TextColor3 = Color3.new(255,255,0)
  179. v.Shape="Block"
  180. text.Text = "GOTTA SWEEP SWEEP SWEEP"
  181. wait(1 / 60)
  182. Effects = { }
  183. local Player = game.Players.localPlayer
  184. local Character = Player.Character
  185. local Humanoid = Character.Humanoid
  186. local mouse = Player:GetMouse()
  187. local m = Instance.new('Model', Character)
  188. m.Name = "WeaponModel"
  189. local LeftArm = Character["Left Arm"]
  190. local RightArm = Character["Right Arm"]
  191. local LeftLeg = Character["Left Leg"]
  192. local RightLeg = Character["Right Leg"]
  193. local Head = Character.Head
  194. local Torso = Character.Torso
  195. local cam = game.Workspace.CurrentCamera
  196. local RootPart = Character.HumanoidRootPart
  197. local RootJoint = RootPart.RootJoint
  198. local equipped = false
  199. local attack = false
  200. local Anim = 'Idle'
  201. local idle = 0
  202. local attacktype = 1
  203. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  204. local velocity = RootPart.Velocity.y
  205. local sine = 0
  206. local change = 1
  207. local grabbed = false
  208. local cn = CFrame.new
  209. local mr = math.rad
  210. local angles = CFrame.Angles
  211. local ud = UDim2.new
  212. local c3 = Color3.new
  213. Instance.new("ForceField", game.Players.LocalPlayer.Character)
  214. local s = Instance.new("Sound",Character)
  215. s.Name = "BGMusic"
  216. s.SoundId = "rbxassetid://0"
  217. s.Pitch = 1
  218. s.Volume = 10
  219. s.Looped = true
  220. s.archivable = false
  221. wait(0.1)
  222. s:play()
  223.  
  224. Humanoid.Animator.Parent = nil
  225. Character.Animate.Parent = nil
  226.  
  227. local newMotor = function(part0, part1, c0, c1)
  228. local w = Instance.new('Motor', part0)
  229. w.Part0 = part0
  230. w.Part1 = part1
  231. w.C0 = c0
  232. w.C1 = c1
  233. return w
  234. end
  235.  
  236. function clerp(a, b, t)
  237. return a:lerp(b, t)
  238. end
  239.  
  240. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  241. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  242.  
  243. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  244. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  245. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  246. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  247. RootJoint.C1 = CFrame.new(0, 0, 0)
  248. RootJoint.C0 = CFrame.new(0, 0, 0)
  249. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  250. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  251.  
  252. local rarmc1 = RW.C1
  253. local larmc1 = LW.C1
  254. local rlegc1 = RH.C1
  255. local llegc1 = LH.C1
  256.  
  257. local resetc1 = false
  258.  
  259. function PlayAnimationFromTable(table, speed, bool)
  260. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  261. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  262. RW.C0 = clerp(RW.C0, table[3], speed)
  263. LW.C0 = clerp(LW.C0, table[4], speed)
  264. RH.C0 = clerp(RH.C0, table[5], speed)
  265. LH.C0 = clerp(LH.C0, table[6], speed)
  266. if bool == true then
  267. if resetc1 == false then
  268. resetc1 = true
  269. RootJoint.C1 = RootJoint.C1
  270. Torso.Neck.C1 = Torso.Neck.C1
  271. RW.C1 = rarmc1
  272. LW.C1 = larmc1
  273. RH.C1 = rlegc1
  274. LH.C1 = llegc1
  275. end
  276. end
  277. end
  278.  
  279. Char = char
  280.  
  281. --[[Credits to SazErenos for his Artificial Heartbeat]]--
  282.  
  283. ArtificialHB = Instance.new("BindableEvent", script)
  284. ArtificialHB.Name = "Heartbeat"
  285.  
  286. script:WaitForChild("Heartbeat")
  287.  
  288. frame = 1 / 30
  289. tf = 0
  290. allowframeloss = false
  291. tossremainder = false
  292. lastframe = tick()
  293. script.Heartbeat:Fire()
  294.  
  295. game:GetService("RunService").Heartbeat:connect(function(s, p)
  296. tf = tf + s
  297. if tf >= frame then
  298. if allowframeloss then
  299. script.Heartbeat:Fire()
  300. lastframe = tick()
  301. else
  302. for i = 1, math.floor(tf / frame) do
  303. script.Heartbeat:Fire()
  304. end
  305. lastframe = tick()
  306. end
  307. if tossremainder then
  308. tf = 0
  309. else
  310. tf = tf - frame * math.floor(tf / frame)
  311. end
  312. end
  313. end)
  314.  
  315. function swait(num)
  316. if num == 0 or num == nil then
  317. ArtificialHB.Event:wait()
  318. else
  319. for i = 0, num do
  320. ArtificialHB.Event:wait()
  321. end
  322. end
  323. end
  324.  
  325. local RbxUtility = LoadLibrary("RbxUtility")
  326. local Create = RbxUtility.Create
  327.  
  328. function RemoveOutlines(part)
  329. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  330. end
  331.  
  332. CFuncs = {
  333. ["Part"] = {
  334. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  335. local Part = Create("Part"){
  336. Parent = Parent,
  337. Reflectance = Reflectance,
  338. Transparency = Transparency,
  339. CanCollide = false,
  340. Locked = true,
  341. BrickColor = BrickColor.new(tostring(BColor)),
  342. Name = Name,
  343. Size = Size,
  344. Material = Material,
  345. }
  346. RemoveOutlines(Part)
  347. return Part
  348. end;
  349. };
  350.  
  351. ["Mesh"] = {
  352. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  353. local Msh = Create(Mesh){
  354. Parent = Part,
  355. Offset = OffSet,
  356. Scale = Scale,
  357. }
  358. if Mesh == "SpecialMesh" then
  359. Msh.MeshType = MeshType
  360. Msh.MeshId = MeshId
  361. end
  362. return Msh
  363. end;
  364. };
  365.  
  366. ["Mesh"] = {
  367. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  368. local Msh = Create(Mesh){
  369. Parent = Part,
  370. Offset = OffSet,
  371. Scale = Scale,
  372. }
  373. if Mesh == "SpecialMesh" then
  374. Msh.MeshType = MeshType
  375. Msh.MeshId = MeshId
  376. end
  377. return Msh
  378. end;
  379. };
  380.  
  381. ["Weld"] = {
  382. Create = function(Parent, Part0, Part1, C0, C1)
  383. local Weld = Create("Weld"){
  384. Parent = Parent,
  385. Part0 = Part0,
  386. Part1 = Part1,
  387. C0 = C0,
  388. C1 = C1,
  389. }
  390. return Weld
  391. end;
  392. };
  393.  
  394. ["Sound"] = {
  395. Create = function(id, par, vol, pit)
  396. coroutine.resume(coroutine.create(function()
  397. local S = Create("Sound"){
  398. Volume = vol,
  399. Pitch = pit or 1,
  400. SoundId = id,
  401. Parent = par or workspace,
  402. }
  403. Instance.new("DistortionSoundEffect", S).Level = 0.1
  404. wait()
  405. S:play()
  406. game:GetService("Debris"):AddItem(S, 10)
  407. end))
  408. end;
  409. };
  410.  
  411. ["ParticleEmitter"] = {
  412. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  413. local fp = Create("ParticleEmitter"){
  414. Parent = Parent,
  415. Color = ColorSequence.new(Color1, Color2),
  416. LightEmission = LightEmission,
  417. Size = Size,
  418. Texture = Texture,
  419. Transparency = Transparency,
  420. ZOffset = ZOffset,
  421. Acceleration = Accel,
  422. Drag = Drag,
  423. LockedToPart = LockedToPart,
  424. VelocityInheritance = VelocityInheritance,
  425. EmissionDirection = EmissionDirection,
  426. Enabled = Enabled,
  427. Lifetime = LifeTime,
  428. Rate = Rate,
  429. Rotation = Rotation,
  430. RotSpeed = RotSpeed,
  431. Speed = Speed,
  432. VelocitySpread = VelocitySpread,
  433. }
  434. return fp
  435. end;
  436. };
  437. }
  438.  
  439. function rayCast(Position, Direction, Range, Ignore)
  440. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  441. end
  442.  
  443. local function GetNearest(obj, distance)
  444. local last, lastx = distance + 1
  445. for i, v in pairs(workspace:GetChildren()) do
  446. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  447. local t = v.Torso
  448. local dist = (t.Position - obj.Position).magnitude
  449. if dist <= distance then
  450. if dist < last then
  451. last = dist
  452. lastx = v
  453. end
  454. end
  455. end
  456. end
  457. return lastx
  458. end
  459.  
  460. --[[ Credits to Kert109 (Ninja_Deer) for the Damage function. Fenrier for the Magnitude Damage ]]--
  461.  
  462. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  463. for i, v in pairs(hit:GetChildren()) do
  464. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  465. local find = v:FindFirstChild("DebounceHit")
  466. if not find then
  467. if v.Parent:findFirstChild("Head") then
  468. local BillG = Create("BillboardGui"){
  469. Parent = v.Parent.Head,
  470. Size = UDim2.new(1, 0, 1, 0),
  471. Adornee = v.Parent.Head,
  472. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  473. }
  474. local TL = Create("TextLabel"){
  475. Parent = BillG,
  476. Size = UDim2.new(3, 3, 3, 3),
  477. BackgroundTransparency = 1,
  478. Text = tostring(damage).."-",
  479. TextColor3 = Color1.Color,
  480. TextStrokeColor3 = Color2.Color,
  481. TextStrokeTransparency = 0,
  482. TextXAlignment = Enum.TextXAlignment.Center,
  483. TextYAlignment = Enum.TextYAlignment.Center,
  484. FontSize = Enum.FontSize.Size18,
  485. Font = "ArialBold",
  486. }
  487. coroutine.resume(coroutine.create(function()
  488. swait(1)
  489. for i = 0, 1, .1 do
  490. swait(.1)
  491. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  492. end
  493. BillG:Destroy()
  494. end))
  495. end
  496. v.Health = v.Health - damage
  497. local bool = Create("BoolValue"){
  498. Parent = v,
  499. Name = "DebounceHit",
  500. }
  501. if HSound ~= nil and HPitch ~= nil then
  502. CFuncs["Sound"].Create(HSound, hit, 1, HPitch)
  503. end
  504. game:GetService("Debris"):AddItem(bool, cooldown)
  505. end
  506. end
  507. end
  508. end
  509.  
  510. function MagnitudeDamage(Part, magni, mindam, maxdam, Color1, Color2, HSound, HPitch)
  511. for _, c in pairs(workspace:children()) do
  512. local hum = c:findFirstChild("Humanoid")
  513. if hum ~= nil then
  514. local head = c:findFirstChild("Torso")
  515. if head ~= nil then
  516. local targ = head.Position - Part.Position
  517. local mag = targ.magnitude
  518. if mag <= magni and c.Name ~= Player.Name then
  519. Damage(head.Parent, math.random(mindam, maxdam), 0.5, Color1, Color2, HSound, HPitch)
  520. end
  521. end
  522. end
  523. end
  524. end
  525.  
  526. Handle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Handle", Vector3.new(-0.399999946, 0.899999976, -0.400000095))
  527. HandleWeld = CFuncs["Weld"].Create(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199958801, -0.0500774384, -1.09998882, -1, 0, 0, 0, 0, -1, -0, -1, -0))
  528. FakeHandle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "FakeHandle", Vector3.new(0.399999946, 0.899999976, 0.400000095))
  529. FakeHandleWeld = CFuncs["Weld"].Create(m, Handle, FakeHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199996948, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  530. Barrel = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Barrel", Vector3.new(0.399999946, 0.399999976, 0.400000095))
  531. BarrelWeld = CFuncs["Weld"].Create(m, FakeHandle, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, -0.749999046, -1.50000024, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  532. Part = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 0, "Medium stone grey", "Part", Vector3.new(-0.399999946, 0.299999952, -0.400000095))
  533. PartWeld = CFuncs["Weld"].Create(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.38, -0.300000194, 0.400000160, 1, 0, 0, 0, 1, 0, 0, 0, -1))
  534. CFuncs["Mesh"].Create("SpecialMesh", Part, Enum.MeshType.FileMesh, "rbxassetid://435073989", Vector3.new(0, 0, 0), Vector3.new(0.00200000009, 0.00700000007, 0.003000010))
  535. Part.Mesh.TextureId = "rbxassetid://1840576589"
  536. Part.Mesh.Scale = Vector3.new(0.5, 0.5, 0.5)
  537.  
  538. EffectModel = Instance.new("Model", Character)
  539. EffectModel.Name = "Effects"
  540.  
  541. Effects = {
  542. ["Block"] = {
  543. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  544. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  545. prt.Anchored = true
  546. prt.CFrame = cframe
  547. local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  548. game:GetService("Debris"):AddItem(prt, 10)
  549. if Type == 1 or Type == nil then
  550. table.insert(Effects, {
  551. prt,
  552. "Block1",
  553. delay,
  554. x3,
  555. y3,
  556. z3,
  557. msh
  558. })
  559. elseif Type == 2 then
  560. table.insert(Effects, {
  561. prt,
  562. "Block2",
  563. delay,
  564. x3,
  565. y3,
  566. z3,
  567. msh
  568. })
  569. end
  570. end;
  571. };
  572.  
  573. ["Cylinder"] = {
  574. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  575. local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
  576. prt.Anchored = true
  577. prt.CFrame = cframe
  578. local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  579. game:GetService("Debris"):AddItem(prt, 2)
  580. Effects[#Effects + 1] = {
  581. prt,
  582. "Cylinder",
  583. delay,
  584. x3,
  585. y3,
  586. z3
  587. }
  588. end;
  589. };
  590.  
  591. ["Sphere"] = {
  592. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  593. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  594. prt.Anchored = true
  595. prt.CFrame = cframe
  596. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  597. game:GetService("Debris"):AddItem(prt, 10)
  598. table.insert(Effects, {
  599. prt,
  600. "Cylinder",
  601. delay,
  602. x3,
  603. y3,
  604. z3,
  605. msh
  606. })
  607. end;
  608. };
  609.  
  610. ["Elec"] = {
  611. Create = function(cff, x, y, z)
  612. local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  613. prt.Anchored = true
  614. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  615. prt.CFrame = CFrame.new(prt.Position)
  616. game:GetService("Debris"):AddItem(prt, 2)
  617. local xval = math.random() / 2
  618. local yval = math.random() / 2
  619. local zval = math.random() / 2
  620. local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  621. table.insert(Effects, {
  622. prt,
  623. "Elec",
  624. 0.1,
  625. x,
  626. y,
  627. z,
  628. xval,
  629. yval,
  630. zval
  631. })
  632. end;
  633.  
  634. };
  635.  
  636. ["Ring"] = {
  637. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  638. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  639. prt.Anchored = true
  640. prt.CFrame = cframe
  641. local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  642. game:GetService("Debris"):AddItem(prt, 10)
  643. table.insert(Effects, {
  644. prt,
  645. "Cylinder",
  646. delay,
  647. x3,
  648. y3,
  649. z3,
  650. msh
  651. })
  652. end;
  653. };
  654.  
  655.  
  656. ["Wave"] = {
  657. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  658. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  659. prt.Anchored = true
  660. prt.CFrame = cframe
  661. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  662. game:GetService("Debris"):AddItem(prt, 10)
  663. table.insert(Effects, {
  664. prt,
  665. "Cylinder",
  666. delay,
  667. x3,
  668. y3,
  669. z3,
  670. msh
  671. })
  672. end;
  673. };
  674.  
  675. ["Break"] = {
  676. Create = function(brickcolor, cframe, x1, y1, z1)
  677. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  678. prt.Anchored = true
  679. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  680. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  681. local num = math.random(10, 50) / 1000
  682. game:GetService("Debris"):AddItem(prt, 10)
  683. table.insert(Effects, {
  684. prt,
  685. "Shatter",
  686. num,
  687. prt.CFrame,
  688. math.random() - math.random(),
  689. 0,
  690. math.random(50, 100) / 100
  691. })
  692. end;
  693. };
  694. }
  695.  
  696. Shoot2 = function(orgpos)
  697. local MouseLook = CFrame.new((orgpos + mouse.Hit.p) / 2, mouse.Hit.p)
  698. Effects["Sphere"].Create(BrickColor.new("White"), CFrame.new(orgpos), 5, 5, 5, 3, 3, 3, 0.1)
  699. table.insert(Effects, {
  700. MouseLook.lookVector,
  701. "Shoot2",
  702. 50,
  703. orgpos,
  704. 5,
  705. 7,
  706. 0,
  707. 1,
  708. 2
  709. })
  710. end
  711.  
  712. function bulletstorm()
  713. attack = true
  714. CFuncs["Sound"].Create("rbxassetid://539881968", Torso, 1, 1)
  715. text.Text = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
  716. wait(1.5)
  717. for i = 0, 1, 0.025 do
  718. swait()
  719. PlayAnimationFromTable({
  720. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  721. CFrame.new(0, 1.4999907, 3.42726707e-007, 1, 0, 0, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  722. CFrame.new(0.431798398, 0.400000006, -0.888215482, 0.939692736, 0.342019886, 0, 0, 0, -1, -0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  723. CFrame.new(-0.559965074, 0.300000012, -0.828456283, 0.939692736, -0.342019886, 0, 0, 0, -1, 0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  724. CFrame.new(0.599619746, -1.99127948, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  725. CFrame.new(-0.599619746, -1.99127901, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  726. }, .3, false)
  727. CFuncs["Sound"].Create("rbxassetid://539882114", Torso, 1, 1)
  728. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  729. Shoot2(Barrel.Position)
  730. text.Text = "guy with an inverted sniper rifle"
  731. end
  732.  
  733. attack = false
  734. end
  735.  
  736. function overload()
  737. attack = true
  738. CFuncs["Sound"].Create("rbxassetid://159257147", Torso, 1, 1)
  739. text.Text = "GOTTA SWEEP SWEEP SWEEP"
  740. Shoot2(LeftArm.Position)
  741. Shoot2(RightArm.Position)
  742. Shoot2(RightLeg.Position)
  743. Shoot2(LeftLeg.Position)
  744. Shoot2(Head.Position)
  745. Shoot2(Torso.Position)
  746. wait(0)
  747. attack = false
  748. text.Text = "guy with an inverted sniper rifle"
  749. end
  750.  
  751. function overcharge()
  752. attack = true
  753. text.Text = "GOTTA SWEEP SWEEP SWEEP"
  754. CFuncs["Sound"].Create("rbxassetid://159257147", Torso, 1, 1)
  755. for i = 0, 1, 0.15 do
  756. swait()
  757. PlayAnimationFromTable({
  758. CFrame.new(-0.0325974114, -4.05311584e-006, 0.110728048, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  759. CFrame.new(0, 1.50000095, 0, 0.64278698, 0, 0.766044974, 0, 1, 0, -0.766044974, 0, 0.64278698),
  760. CFrame.new(1.10100186, 0.535800219, -0.637803555, 0.658456147, 0.673041463, 0.336824596, 0.280167073, 0.196174845, -0.939692438, -0.698528469, 0.713113427, -0.0593915135),
  761. CFrame.new(-1.62758517, 0.073027119, -0.378663093, 0.90510416, 0.321394593, -0.278374165, -0.392632991, 0.883023262, -0.25711751, 0.163174719, 0.342016995, 0.92541796),
  762. CFrame.new(0.644929826, -1.96549833, 0.164695352, 0.962249994, -0.148305506, 0.228211343, 0.0871559754, 0.962249756, 0.257835865, -0.257834762, -0.22821258, 0.938850582),
  763. CFrame.new(-0.750219464, -1.99537396, -0.240616962, 0.862504363, 0.0818999186, 0.499378443, -0.08583197, 0.99619472, -0.0151344473, -0.498717606, -0.0298091136, 0.866251826),
  764. }, .5, false)
  765. end
  766. wait(3)
  767. Shoot2(Barrel.Position)
  768. Shoot2(Barrel.Position)
  769. Shoot2(Handle.Position)
  770. Shoot2(Handle.Position)
  771. Shoot2(FakeHandle.Position)
  772. Shoot2(FakeHandle.Position)
  773. Shoot2(Barrel.Position)
  774. Shoot2(Barrel.Position)
  775. Shoot2(Handle.Position)
  776. Shoot2(Handle.Position)
  777. Shoot2(FakeHandle.Position)
  778. Shoot2(FakeHandle.Position)
  779. Shoot2(Barrel.Position)
  780. Shoot2(Barrel.Position)
  781. Shoot2(Handle.Position)
  782. Shoot2(Handle.Position)
  783. Shoot2(FakeHandle.Position)
  784. Shoot2(FakeHandle.Position)
  785. Shoot2(Barrel.Position)
  786. Shoot2(Barrel.Position)
  787. Shoot2(Handle.Position)
  788. Shoot2(Handle.Position)
  789. Shoot2(FakeHandle.Position)
  790. Shoot2(FakeHandle.Position)
  791. for i = 0, 1, 0.15 do
  792. swait()
  793. PlayAnimationFromTable({
  794. CFrame.new(2.70828605e-006, -0.256154776, -0.071654655, 0.499999046, -1.78813579e-007, -0.866026044, 0.150384009, 0.984807789, 0.0868238211, 0.852869093, -0.173648283, 0.492402941),
  795. CFrame.new(4.34633694e-006, 1.49999607, 2.42484384e-006, 0.646143615, 0.0549410731, 0.761235893, -0.0851004422, 0.996372402, 0.000322267413, -0.758456767, -0.0649897307, 0.648474991),
  796. CFrame.new(1.86507177, 0.598104239, 0.183552518, -0.114682339, -0.981059372, -0.156110525, 0.981060445, -0.0871559381, -0.172987223, 0.156104773, -0.172992408, 0.9724738),
  797. CFrame.new(-1.52644157, 0.0874626189, -0.302744657, 0.95125103, 0.20658794, -0.229004204, -0.254887104, 0.944645047, -0.2065873, 0.173649222, 0.254886597, 0.951251268),
  798. CFrame.new(0.623469114, -1.90178788, 0.0298061967, 0.992532074, -0.0928985924, 0.079056859, 0.0757590532, 0.97739321, 0.197391063, -0.0956070125, -0.189927697, 0.977131963),
  799. CFrame.new(-0.786503196, -1.67652178, -0.389780819, 0.631277382, 0.179900557, 0.754403591, -0.0723632798, 0.982144117, -0.173656344, -0.772174001, 0.0550341941, 0.6330235),
  800. }, .35, false)
  801. text.Text = "guy with an inverted sniper rifle"
  802. end
  803. attack = false
  804. end
  805.  
  806. function attackone()
  807. attack = true
  808. text.Text = "GOTTA SWEEP SWEEP SWEEP"
  809.  
  810. howtobasic1 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  811. howtobasic1.Volume = 45
  812. howtobasic1.SoundId = "rbxassetid://1781430032"
  813. howtobasic2 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  814. howtobasic2.Volume = 45
  815. howtobasic2.SoundId = "rbxassetid://1781430032"
  816. howtobasic3 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  817. howtobasic3.Volume = 45
  818. howtobasic3.SoundId = "rbxassetid://1781430032"
  819. howtobasic = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  820. howtobasic.Volume = 45
  821. howtobasic.SoundId = "rbxassetid://1781430032"
  822.  
  823. local Math = math.random(1,4)
  824. if Math == 1 then
  825. howtobasic:Play()
  826. end
  827. if Math == 2 then
  828. howtobasic1:Play()
  829. end
  830. if Math == 3 then
  831. howtobasic2:Play()
  832. end
  833. if Math == 4 then
  834. howtobasic3:Play()
  835. end
  836. for i = 0, 1, 0.025 do
  837. swait()
  838. PlayAnimationFromTable({
  839. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  840. CFrame.new(0, 1.4999907, 3.42726707e-007, 1, 0, 0, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  841. CFrame.new(0.431798398, 0.400000006, -0.888215482, 0.939692736, 0.342019886, 0, 0, 0, -1, -0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  842. CFrame.new(-0.559965074, 0.300000012, -0.828456283, 0.939692736, -0.342019886, 0, 0, 0, -1, 0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  843. CFrame.new(0.599619746, -1.99127948, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  844. CFrame.new(-0.599619746, -1.99127901, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  845. }, .3, false)
  846. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  847. end
  848. CFuncs["Sound"].Create("rbxassetid://0", Barrel, 5, 1)
  849. text.Text = "GOTTA SWEEP SWEEP SWEEP"
  850. Shoot2(Barrel.Position)
  851. for i = 0, 1, 0.15 do
  852. swait()
  853. RootPart.Velocity = RootPart.CFrame.lookVector * -50
  854. PlayAnimationFromTable({
  855. CFrame.new(-0, -0.281125277, 0.157014638, 1, 0, -0, 0, 0.906307876, -0.422617942, 0, 0.422617942, 0.906307876) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  856. CFrame.new(0, 1.4999938, 1.05202198e-005, 1, 0, -0, 0, 0.965925813, 0.258818924, -0, -0.258818924, 0.965925813) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  857. CFrame.new(0.406597674, 0.817824185, -0.957423151, 0.939692974, 0.280165672, -0.196174338, -5.36441803e-007, -0.573575616, -0.819152534, -0.34201926, 0.769751906, -0.538984895) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  858. CFrame.new(-0.506752789, 0.775180221, -0.974653006, 0.939692974, -0.280165732, 0.196174279, 5.36441803e-007, -0.573575556, -0.819152713, 0.34201926, 0.769752145, -0.538984716) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  859. CFrame.new(0.566868722, -1.61683154, -0.13679418, 0.954536259, -0.174988821, -0.241328761, 0.172366679, 0.984509468, -0.0321052969, 0.243208498, -0.0109513998, 0.969912171) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  860. CFrame.new(-0.545306504, -1.37044179, -0.679420352, 0.996202111, 0.0754783303, 0.0434113704, -0.0434117466, 0.862729907, -0.503797948, -0.0754781216, 0.49999994, 0.862729967) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  861. }, .6, false)
  862. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(-20), math.rad(0)), 0.3)
  863. end
  864. for i = 0, 1, 0.15 do
  865. swait()
  866. RootPart.Velocity = RootPart.CFrame.lookVector * -100
  867. PlayAnimationFromTable({
  868. CFrame.new(-0, -0.795007467, 0.0831707418, 1, 0, -0, 0, 0.76604414, -0.642788053, 0, 0.642788053, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  869. CFrame.new(0, 1.49999774, 1.20103359e-005, 1, 0, -0, 0, 0.965925634, 0.258819878, -0, -0.258819878, 0.965925634) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  870. CFrame.new(1.70605683, 1.21151328, -0.185158521, 0.893217862, -0.29338178, -0.340718448, -0.340719074, -0.936116338, -0.0871595442, -0.293381065, 0.193941653, -0.936116695) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  871. CFrame.new(-1.69524968, 1.05172348, -0.252849877, 0.812758088, 0.493294626, 0.309975445, 0.582562625, -0.694268882, -0.422624737, 0.00672781467, 0.524071693, -0.851647615) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  872. CFrame.new(0.689150453, -1.88461804, -0.0157705098, 0.954536736, -0.174989104, -0.241326213, 0.172367141, 0.984509468, -0.0321044922, 0.243205875, -0.0109517872, 0.969912887) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  873. CFrame.new(-0.536899447, -1.34506011, -0.583059072, 0.99620223, 0.0226762109, 0.0840658173, -0.043412663, 0.966281295, 0.253803402, -0.0754759163, -0.256489068, 0.963595748) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  874. }, .2, false)
  875. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.3)
  876. end
  877. for i = 0, 1, 0.05 do
  878. swait()
  879. RootPart.Velocity = RootPart.CFrame.lookVector * -50
  880. PlayAnimationFromTable({
  881. CFrame.new(-0, -2.09708667, 0.108620644, 1, 0, -0, 0, 0.573575675, -0.819152594, 0, 0.819152594, 0.573575675) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  882. CFrame.new(0, 1.53697455, -0.422635257, 1, 0, -0, 0, 0.766043842, 0.64278841, -0, -0.64278841, 0.766043842) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  883. CFrame.new(1.57810855, 0.650130272, 0.33058399, 0.930655897, -0.284022599, -0.230674848, 0.352510452, 0.527023435, 0.773293555, -0.0980618149, -0.800985396, 0.590598404) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  884. CFrame.new(-1.38994181, 0.87733829, 0.667137444, 0.963715255, 0.08906921, 0.251633942, -0.25866431, 0.0788001418, 0.962747812, 0.0659223944, -0.992903471, 0.0989798903) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  885. CFrame.new(0.774198592, -1.52057803, -0.607582211, 0.954536974, -0.272207022, -0.121501081, 0.172365844, 0.83655864, -0.520057499, 0.243206039, 0.475471497, 0.845445395) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  886. CFrame.new(-0.530096769, -1.05517173, -0.660005629, 0.99620223, 0.0226761587, 0.0840661526, -0.0434127897, 0.966280818, 0.253804684, -0.0754762068, -0.256490231, 0.96359539) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  887. }, .3, false)
  888. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-60), math.rad(0)), 0.3)
  889. end
  890. for i = 0, 1, 0.13 do
  891. swait()
  892. PlayAnimationFromTable({
  893. CFrame.new(-0, -1.01349139, -0.251608461, 1, 0, 0, 0, 0.707105339, 0.707108378, 0, -0.707108378, 0.707105339) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  894. CFrame.new(0.0127754211, 1.44207788, 0.0749337673, 1, 0, 0, 0, 0.939691544, -0.342023343, 0, 0.342023343, 0.939691544) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  895. CFrame.new(1.62296665, 0.191783041, -0.192457974, 0.930656254, -0.329096794, 0.159920022, 0.352511466, 0.923570275, -0.150843769, -0.098055169, 0.196757287, 0.975536823) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  896. CFrame.new(-0.870643735, 0.71258086, -0.942903101, 0.18127799, -0.372358024, -0.910213113, -0.781424284, 0.507405519, -0.363202393, 0.597088516, 0.777103186, -0.19898814) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  897. CFrame.new(0.214147568, -1.73508716, -0.0895051956, 0.924306214, 0.282332808, -0.256800473, -0.113861978, 0.846218646, 0.520528436, 0.364271581, -0.451887846, 0.814311981) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  898. CFrame.new(-0.535767198, -0.599929333, -0.996632636, 0.996202111, 0.0754788443, 0.0434101112, -0.0434126705, 0.862728953, -0.503799856, -0.0754773915, 0.500001788, 0.862729192) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  899. }, .3, false)
  900. end
  901. attack = false
  902. end
  903.  
  904. --[[Attacks]]--
  905.  
  906. mouse.Button1Down:connect(function()
  907. if attack == false and attacktype == 1 then
  908. attackone()
  909. end
  910. end)
  911.  
  912.  
  913. mouse.KeyDown:connect(function(k)
  914. k = k:lower()
  915. if attack == false and k == 'q' then
  916. bulletstorm()
  917. elseif attack == false and k == 'e' then
  918. overload()
  919. elseif attack == false and k == 'r' then
  920. overcharge()
  921. end
  922. end)
  923.  
  924. while true do
  925. swait()
  926. for i, v in pairs(Character:GetChildren()) do
  927. if v:IsA("Part") then
  928. v.Material = "SmoothPlastic"
  929. elseif v:IsA("Accessory") then
  930. v:WaitForChild("Handle").Material = "SmoothPlastic"
  931. end
  932. end
  933. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  934. velocity = RootPart.Velocity.y
  935. sine = sine + change
  936. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  937. if equipped == true or equipped == false then
  938. if RootPart.Velocity.y > 1 and hit == nil then
  939. Anim = "Jump"
  940. if attack == false then
  941. PlayAnimationFromTable({
  942. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  943. CFrame.new(0, 1.49221826, -0.044082582, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  944. CFrame.new(1.66304386, 0.182627335, 0.00782334805, 0.883022726, -0.392632574, 0.257119894, 0.321392894, 0.905103981, 0.2783764, -0.342019886, -0.163176134, 0.925416708) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  945. CFrame.new(-1.66570556, 0.224230319, 0.110721856, 0.903736115, 0.408218145, -0.128915116, -0.34750703, 0.875426054, 0.33595863, 0.25000003, -0.258819014, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  946. CFrame.new(0.499999166, -1.99999452, 4.76837158e-007, 0.984807849, -5.94328526e-007, -0.173648044, 0.0449439958, 0.965925872, 0.254886925, 0.167730987, -0.258819073, 0.951251388) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  947. CFrame.new(-0.499999404, -1.51703107, -0.129407585, 0.965925753, 6.6929374e-007, 0.258819193, -0.0669879839, 0.965925813, 0.24999994, -0.24999994, -0.258819163, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  948. }, .3, false)
  949. end
  950. elseif RootPart.Velocity.y < -60 and hit == nil then
  951. Anim = "Fall"
  952. if attack == false then
  953. PlayAnimationFromTable({
  954. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  955. CFrame.new(0, 1.49221873, -0.0440826714, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  956. CFrame.new(1.76076102, 0.406842887, 0.0212866664, 0.695482016, -0.670965135, 0.257119834, 0.611573994, 0.74059701, 0.278376371, -0.377202988, -0.0363579579, 0.925416648) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  957. CFrame.new(-1.68029141, 0.390803367, 0.155905366, 0.70961535, 0.692695498, -0.128914997, -0.625963271, 0.703777075, 0.335958213, 0.323444158, -0.157705069, 0.933012843) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  958. CFrame.new(0.693307817, -1.96826017, -0.0605875254, 0.986561239, -0.127662987, -0.101976946, 0.137943029, 0.985269904, 0.101069227, 0.0875720233, -0.113777988, 0.989639223) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  959. CFrame.new(-0.526552737, -1.81498528, -0.152177691, 0.965925574, 0.0449441113, 0.254888207, -0.066988036, 0.994663239, 0.0784704387, -0.250001162, -0.0928710476, 0.963781357) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  960. }, .3, false)
  961. end
  962. elseif Torsovelocity < 1 and hit ~= nil then
  963. Anim = "Idle"
  964. if attack == false then
  965. change = 1
  966. PlayAnimationFromTable({
  967. CFrame.new(1.22602091e-006, -0.219458103, 1.46111324e-006, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  968. CFrame.new(0, 1.49999201, 0, 0.707106233, 0, -0.707107306, 0, 1, 0, 0.707107306, 0, 0.707106233) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  969. CFrame.new(0.571566343, -0.0739164352, -0.639066696, 0.939692855, 0.340718329, -0.0298085809, -0.241844058, 0.600305915, -0.762328327, -0.241844922, 0.723563433, 0.646503866) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  970. CFrame.new(-0.628383756, -0.12163578, -0.696761668, 0.939692736, -0.342020065, -5.06639481e-007, 0.196173996, 0.538984895, -0.819152653, 0.280166954, 0.769751549, 0.573575616) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  971. CFrame.new(0.624118924, -1.79798961, 0.0678238794, 0.995454907, -0.0383867361, -0.0871553123, 0.0385330059, 0.999257326, -4.09960694e-006, 0.0870907605, -0.00335427374, 0.996194839) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  972. CFrame.new(-0.53866595, -1.82180798, 0.00821807235, 0.977763176, 0.0281341001, 0.207816422, -0.0287620034, 0.999586344, -1.4934686e-007, -0.207730502, -0.00597707182, 0.978167892) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  973. }, .3, false)
  974. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  975. end
  976. elseif Torsovelocity > 2 and hit ~= nil then
  977. Anim = "Walk"
  978. if attack == false then
  979. change = 3
  980. PlayAnimationFromTable({
  981. CFrame.new(0, -0.0240751095, -0.146390602, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  982. CFrame.new(0, 1.49999237, -1.81794167e-006, 1, 0, 0, 0, 0.984807789, -0.173647881, 0, 0.173647881, 0.984807789) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  983. CFrame.new(0.172261134, 0.427689523, -1.09730911, 0.644483984, 0.748984814, -0.153825179, 0.413525045, -0.510645986, -0.753815472, -0.643146515, 0.422211438, -0.638827145) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  984. CFrame.new(-1.1922102, 0.363029838, -0.448653877, 0.935289383, -0.110854559, -0.33607316, -0.341521561, -0.531564534, -0.775114357, -0.0927196145, 0.839732468, -0.535025835) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  985. CFrame.new(.5, -1.85 - 0.5 * math.cos(sine / 8) / 2, 0 + 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(-50 * math.sin(sine / 8)), math.rad(0), math.rad(0)),
  986. CFrame.new(-.5, -1.85 + 0.5 * math.cos(sine / 8) / 2, 0 - 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(50 * math.sin(sine / 8)), math.rad(0), math.rad(0)),
  987. }, .3, false)
  988. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.3)
  989. end
  990. end
  991. end
  992. if 0 < #Effects then
  993. for e = 1, #Effects do
  994. if Effects[e] ~= nil then
  995. local Thing = Effects[e]
  996. if Thing ~= nil then
  997. local Part = Thing[1]
  998. local Mode = Thing[2]
  999. local Delay = Thing[3]
  1000. local IncX = Thing[4]
  1001. local IncY = Thing[5]
  1002. local IncZ = Thing[6]
  1003. if Thing[2] == "Shoot" then
  1004. local Look = Thing[1]
  1005. local hit, pos = rayCast(Thing[4], Look, 15, Character)
  1006. local mag = (Thing[4] - pos).magnitude
  1007. Thing[9] = Thing[9] + 0.5
  1008. Thing[5] = Thing[5] + 0.2
  1009. Thing[6] = Thing[6] + 0.2
  1010. Effects["Cylinder"].Create(BrickColor.new("White"), CFrame.new((Thing[4] + pos) / 2, pos) * angles(1.57, 0, 0), Thing[9], mag * 5, Thing[9], -0.2, 0, -0.2, 0.1)
  1011. Thing[4] = Thing[4] + Look * 15
  1012. Thing[3] = Thing[3] - 1
  1013. if hit ~= nil then
  1014. Thing[3] = 0
  1015. ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("White"), "Reference", Vector3.new())
  1016. ref.Anchored = true
  1017. ref.CFrame = CFrame.new(pos)
  1018. Effects["Sphere"].Create(BrickColor.new("Bright yellow"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  1019. CFuncs["Sound"].Create("rbxassetid://539881968", ref, 0.1, 1)
  1020. game:GetService("Debris"):AddItem(ref, 10)
  1021. end
  1022. if Thing[3] <= 0 then
  1023. table.remove(Effects, e)
  1024. end
  1025. end
  1026. do
  1027. if Thing[2] == "Shoot2" then
  1028. local Look = Thing[1]
  1029. local hit, pos = rayCast(Thing[4], Look, 3, Character)
  1030. local mag = (Thing[4] - pos).magnitude
  1031. Thing[9] = Thing[9] + 0.5
  1032. Thing[5] = Thing[5] + 0.2
  1033. Thing[6] = Thing[6] + 0.2
  1034. Effects["Sphere"].Create(BrickColor.new("Bright yellow"), CFrame.new((Thing[4] + pos) / 2, pos), 25, 25, 25, -5, -5, -5, 0.2)
  1035. Thing[4] = Thing[4] + Look * 3
  1036. Thing[3] = Thing[3] + 5
  1037. if hit ~= nil then
  1038. Thing[3] = 0
  1039. ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("White"), "Reference", Vector3.new())
  1040. ref.Anchored = true
  1041. ref.CFrame = CFrame.new(pos)
  1042. Effects["Sphere"].Create(BrickColor.new("Really yellow"), CFrame.new(pos), 25, 25, 25, 5, 5, 5, 0.01)
  1043. Effects["Sphere"].Create(BrickColor.new("Bright yellow"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01)
  1044. Effects["Block"].Create(BrickColor.new("White"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01, 1)
  1045. Effects["Wave"].Create(BrickColor.new("Smoky grey"), CFrame.new(pos), 2, 2, 2, 3, 3, 3, 0.01)
  1046. CFuncs["Sound"].Create("rbxassetid://0", ref, 1, 1)
  1047. CFuncs["Sound"].Create("rbxassetid://0", Sphere, 0.5, 1)
  1048. CFuncs["Sound"].Create("rbxassetid://0", Sphere, 0.1, 1)
  1049. local e = Instance.new("Explosion", ref)
  1050. e.Position = ref.Position
  1051. e.BlastRadius = 400
  1052. e.DestroyJointRadiusPercent = 400
  1053. e.Visible = false
  1054. e.ExplosionType = "CratersAndDebris"
  1055. game:GetService("Debris"):AddItem(ref, 2)
  1056. end
  1057. if Thing[3] <= 0 then
  1058. table.remove(Effects, e)
  1059. end
  1060. end
  1061. do
  1062. do
  1063. if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" and Thing[2] ~= "Shoot2" then
  1064. if Thing[1].Transparency <= 1 then
  1065. if Thing[2] == "Block1" then
  1066. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1067. Mesh = Thing[7]
  1068. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1069. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1070. else
  1071. if Thing[2] == "Block2" then
  1072. Thing[1].CFrame = Thing[1].CFrame
  1073. Mesh = Thing[7]
  1074. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1075. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1076. else
  1077. if Thing[2] == "Block3" then
  1078. Thing[8].C0 = CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) * Thing[9]
  1079. Mesh = Thing[7]
  1080. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1081. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1082. else
  1083. if Thing[2] == "Cylinder" then
  1084. Mesh = Thing[7]
  1085. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1086. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1087. else
  1088. if Thing[2] == "Cylinder2" then
  1089. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, Thing[8], 0)
  1090. Mesh = Thing[7]
  1091. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1092. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1093. else
  1094. if Thing[2] == "Blood" then
  1095. Mesh = Thing[7]
  1096. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  1097. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1098. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1099. else
  1100. if Thing[2] == "Elec" then
  1101. Mesh = Thing[10]
  1102. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1103. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1104. else
  1105. if Thing[2] == "Disappear" then
  1106. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1107. end
  1108. end
  1109. end
  1110. end
  1111. end
  1112. end
  1113. end
  1114. end
  1115. else
  1116. Part.Parent = nil
  1117. table.remove(Effects, e)
  1118. end
  1119. end
  1120. end
  1121. end
  1122. end
  1123. end
  1124. end
  1125. end
  1126. end
  1127. end
  1128. local plr = game.Players.LocalPlayer
  1129. local chr = plr.Character
  1130. local maus = plr:GetMouse()
  1131. local PGui=plr.PlayerGui
  1132. local lleg = chr["Left Leg"]
  1133. local rleg = chr["Right Leg"]
  1134. local larm = chr["Left Arm"]
  1135. local rarm = chr["Right Arm"]
  1136. local hed = chr.Head
  1137. local rutprt = chr.HumanoidRootPart
  1138. local torso = chr.Torso
  1139. local otheranims=false
  1140. local armmovement=false
  1141. chr.Animate.Disabled=true
  1142. local RunSpeed=36
  1143. local WlkSpeed=18
  1144. local runnin=false
  1145. local tik=0
  1146. local rollvalue=0
  1147. local swimming=false
  1148. local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
  1149. local jumpval=0
  1150. local idlerollv=0
  1151.  
  1152. local BallColor=torso.BrickColor
  1153. local BallTransparency=0
  1154. local BallReflectance=0
  1155. local BallMaterial="Neon"
  1156.  
  1157.  
  1158.  
  1159. coroutine.wrap(function()
  1160. for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
  1161. function Lerp(a, b, i)
  1162. local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
  1163. local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
  1164. local calx = com1[1] + (com2[1] - com1[1]) * i
  1165. local caly = com1[2] + (com2[2] - com1[2]) * i
  1166. local calz = com1[3] + (com2[3] - com1[3]) * i
  1167. local cala = com1[4] + (com2[4] - com1[4]) * i
  1168. local calb = com1[5] + (com2[5] - com1[5]) * i
  1169. local calc = com1[6] + (com2[6] - com1[6]) * i
  1170. return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
  1171. end
  1172. function TwnSingleNumber(s,f,m)
  1173. local wot=s+(f-s)*m
  1174. return wot
  1175. end
  1176. function TwnVector3(q,w,e)
  1177. local begin={q.x,q.y,q.z}
  1178. local ending={w.x,w.y,w.z}
  1179. local bgx=begin[1]+(ending[1]-begin[1])*e
  1180. local bgy=begin[2]+(ending[2]-begin[2])*e
  1181. local bgz=begin[3]+(ending[3]-begin[3])*e
  1182. return Vector3.new(bgx,bgy,bgz)
  1183. end
  1184. newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
  1185. wld = Instance.new("Weld", wp1)
  1186. wld.Part0 = wp0
  1187. wld.Part1 = wp1
  1188. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  1189. end
  1190. function Avg(a, b)
  1191. return CFrame.new((a.X+b.X)/2,(a.Y+b.Y)/2,(a.Z+b.Z)/2)
  1192. end
  1193.  
  1194. local jump=Instance.new('Sound',rutprt)
  1195. jump.Volume=.2
  1196. jump.Pitch=1
  1197. jump.SoundId='http://www.roblox.com/asset?id=170588191'
  1198.  
  1199. newWeld(law, torso, larm, -1.5, 0.5, 0)
  1200. newWeld(raw, torso, rarm, 1.5, 0.5, 0)
  1201. newWeld(llw, torso, lleg, -.5, -2, 0)
  1202. newWeld(rlw, torso, rleg, .5, -2, 0)
  1203. newWeld(hw, torso, hed, 0, 1.5, 0)
  1204. local rutwald=Instance.new('Weld',rutprt)
  1205. rutwald.Part0=rutprt
  1206. rutwald.Part1=torso
  1207. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  1208. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  1209. rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  1210. lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
  1211.  
  1212. local anim = "Idling"
  1213. local lastanim = "Idling"
  1214. local val = 0
  1215. local syne = 0
  1216. local num = 0
  1217. local runtime = 0
  1218.  
  1219. maus.KeyDown:connect(function(kei)
  1220. if string.byte(kei)==48 and not otheranims and not sitting and not disabled then
  1221. runnin=true
  1222. end
  1223. if kei=='w' then fldb.w=true end
  1224. if kei=='a' then fldb.a=true end
  1225. if kei=='s' then fldb.s=true end
  1226. if kei=='d' then fldb.d=true end
  1227. end)
  1228. maus.KeyUp:connect(function(kei)
  1229. if string.byte(kei)==48 and not otheranims and not sitting and not disabled then
  1230. runnin=false
  1231. end
  1232. if kei=='w' then fldb.w=false end
  1233. if kei=='a' then fldb.a=false end
  1234. if kei=='s' then fldb.s=false end
  1235. if kei=='d' then fldb.d=false end
  1236. end)
  1237.  
  1238. local bawl=Instance.new("Part",torso)
  1239. bawl.formFactor="Custom"
  1240. bawl.Shape="Ball"
  1241. bawl.BrickColor=(BallColor or torso.BrickColor)
  1242. bawl.Material=BallMaterial
  1243. bawl.Transparency=(BallTransparency or 0)
  1244. bawl.Reflectance=(BallReflectance or 0)
  1245. bawl.Size=Vector3.new(5.35,5.35,5.35)
  1246. bawl.TopSurface=10
  1247. bawl.BottomSurface=10
  1248. bawl.LeftSurface=10
  1249. bawl.RightSurface=10
  1250. bawl.FrontSurface=10
  1251. bawl.BackSurface=10
  1252. bawl.Anchored=false
  1253. bawl:breakJoints''
  1254. bawl.Locked=true
  1255. bawl.CanCollide=true
  1256. --[[local bawlmesh=Instance.new("SpecialMesh",bawl)
  1257. bawlmesh.MeshId="http://www.roblox.com/asset/?id=1527559"
  1258. --bawlmesh.TextureId="http://www.roblox.com/asset?id=25701026"
  1259. bawlmesh.Scale=Vector3.new(2.35,2.35,2.35)]]
  1260. local bawllight=Instance.new("PointLight",bawl)
  1261. bawllight.Brightness=1
  1262. bawllight.Range=15
  1263. bawllight.Color=bawl.BrickColor.Color
  1264. bawllight.Shadows=true
  1265. local bawlweld=Instance.new("Weld",bawl)
  1266. bawlweld.Part0=rutprt
  1267. bawlweld.Part1=bawl
  1268. bawlweld.C1=CFrame.new(0,0,0)
  1269. rutprt.Weld.C1=CFrame.new(0,-bawl.Size.y,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
  1270.  
  1271. chr.Humanoid.Swimming:connect(function(speedpls)
  1272. if speedpls>=5 and not otheranims and not disabled and not sitting then
  1273. swimming=true
  1274. anim="Swimming"
  1275. elseif speedpls<5 and not otheranims and not disabled and not sitting then
  1276. swimming=false
  1277. end
  1278. end)
  1279.  
  1280. coroutine.resume(coroutine.create(function()
  1281. while true do
  1282. if trailing then
  1283. local Ray=Ray.new(rutprt.CFrame.p,(rutprt.CFrame.p-(rutprt.CFrame*CFrame.new(0,-2,0)).p).unit*-5)
  1284. local hitbrick,hitposition=Workspace:FindPartOnRay(Ray,chr)
  1285. if hitbrick and hitposition then
  1286. local splash=Instance.new("Part",bawl)
  1287. splash.Anchored=true
  1288. splash.CanCollide=false
  1289. splash.Transparency=0
  1290. splash.formFactor="Custom"
  1291. splash.BrickColor=hitbrick.BrickColor
  1292. splash.Size=Vector3.new(2,2,2)
  1293. game:service'Debris':AddItem(splash,2)
  1294. splash.CFrame=CFrame.new(hitposition)*CFrame.Angles(math.random(1,3),math.random(1,3),math.random(1,3))
  1295. local splm=Instance.new("BlockMesh",splash)
  1296. coroutine.wrap(function()
  1297. for a=0,1,.05 do
  1298. splm.Scale=Vector3.new(a,a,a) splash.Transparency=splash.Transparency+.05 splash.CFrame=splash.CFrame+Vector3.new(0,.05,0) wait'' end
  1299. end)()
  1300. end
  1301. wait''
  1302. else
  1303. wait''
  1304. end
  1305. end
  1306. end))
  1307.  
  1308. game:service'RunService'.RenderStepped:connect(function()
  1309. syne=syne+1
  1310. if not otheranims and not swimming then
  1311. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not dnc and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1312. anim="Idling"
  1313.  
  1314. elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-5 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1315. anim="Walking"
  1316. dnc=false
  1317.  
  1318. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
  1319. anim="Sprinting"
  1320. dnc=false
  1321.  
  1322. elseif torso.Velocity.y>5 and chr.Humanoid.Jump then
  1323. anim='Jumping'
  1324. dnc=false
  1325.  
  1326. elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then
  1327. anim='Falling'
  1328. dnc=false
  1329.  
  1330. end
  1331. end
  1332.  
  1333. if anim~=lastanim then runtime=0 end
  1334. lastanim=anim
  1335.  
  1336. if anim=="Idling" then
  1337. trailing=false
  1338. if not armmovement then
  1339. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/32.5)/25,0)*CFrame.Angles(0,0,math.rad(3)),.1)
  1340. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/32.5)/25,0)*CFrame.Angles(0,0,math.rad(-3)),.1)
  1341. end
  1342. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/32.5)/20,(math.cos(syne/32.5)/35))*CFrame.Angles(-(math.cos(syne/32.5)/35),0,math.rad(-2.5)),.1)
  1343. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/32.5)/20,(math.cos(syne/32.5)/35))*CFrame.Angles(-(math.cos(syne/32.5)/35),0,math.rad(2.5)),.1)
  1344. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/32.5)/50,0)*CFrame.Angles(math.cos(syne/32.5)/40,0,0),.1)
  1345. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.4,-math.cos(syne/25)*3)*CFrame.Angles(math.cos(syne/25)/4,math.rad(0),math.rad(0)),.1)
  1346. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,-math.cos(syne/25)*3)*CFrame.Angles(math.rad(rollvalue),0,0),.25)
  1347. end
  1348.  
  1349.  
  1350. if anim=="Walking" then
  1351. trailing=true
  1352. rollvalue=rollvalue+3
  1353. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5))
  1354. elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5))
  1355. else
  1356. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5)),.2) end
  1357. if not armmovement then
  1358. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/8)/6,math.cos(syne/8)/6)*CFrame.Angles(-math.cos(syne/8)/3+math.rad(25),0,math.rad(12.5)),.1)
  1359. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/8)/6,-math.cos(syne/8)/6)*CFrame.Angles(math.cos(syne/8)/3+math.rad(25),0,math.rad(-12.5)),.1)
  1360. end
  1361.  
  1362. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/8)/11)-.5,-1.7+math.sin(syne/4)/3.5-math.cos(syne/8)/4,math.rad(-5)-(math.cos(syne/8)))*CFrame.Angles(math.rad(5)+(math.cos(syne/8)),0,-(math.cos(syne/8)/11)+math.rad(1)),.1)
  1363.  
  1364. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/8)/11)+.5,-1.7-math.sin(syne/4)/3.5+math.cos(syne/8)/4,math.rad(-5)+(math.cos(syne/8)))*CFrame.Angles(math.rad(5)-(math.cos(syne/8)),0,-(math.cos(syne/8)/11)+math.rad(-1)),.1)
  1365.  
  1366. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.5-math.cos(syne/4)/2,-math.cos(syne/4)*1.5)*CFrame.Angles(math.cos(syne/4)/10+math.rad(-5),math.cos(syne/4)/10,math.cos(syne/8)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
  1367. end
  1368.  
  1369. if anim=="Sprinting" then
  1370. trailing=true
  1371. rollvalue=rollvalue+5
  1372. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  1373. elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  1374. else
  1375. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5)),.2) end
  1376. if not armmovement then
  1377. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/6)/6,math.sin(syne/6)/5)*CFrame.Angles(-math.cos(syne/6)/3+math.rad(25),0,math.rad(12.5)),.1)
  1378. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/6)/6,-math.sin(syne/6)/5)*CFrame.Angles(math.cos(syne/6)/3+math.rad(25),0,math.rad(-12.5)),.1)
  1379. end
  1380.  
  1381. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/6)/11)-.575,-1.7+math.cos(syne/3)/4-math.cos(syne/6)/4,math.rad(-5)-(math.cos(syne/6)))*CFrame.Angles(math.rad(5)+(math.cos(syne/6)),0,-(math.cos(syne/6)/11)+math.rad(-5)),.1)
  1382.  
  1383. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/6)/11)+.575,-1.7-math.cos(syne/3)/4+math.cos(syne/6)/4,math.rad(-5)+(math.cos(syne/6)))*CFrame.Angles(math.rad(5)-(math.cos(syne/6)),0,-(math.cos(syne/6)/11)+math.rad(5)),.1)
  1384.  
  1385. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.5-math.cos(syne/3)/2,-math.cos(syne/3)*1.5)*CFrame.Angles(math.cos(syne/3)/10+math.rad(-5),math.cos(syne/3)/10,math.cos(syne/6)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
  1386. end
  1387.  
  1388. if anim=="Falling" then
  1389. trailing=false
  1390. if not armmovement then
  1391. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(25),0,math.rad(25)),.1)
  1392. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(25),0,math.rad(-25)),.1)
  1393. end
  1394. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,math.rad(-20))*CFrame.Angles(math.rad(20),0,math.rad(-2.5)),.1)
  1395. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,math.rad(-20))*CFrame.Angles(math.rad(20),0,math.rad(2.5)),.1)
  1396. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-15),0,0),.1)
  1397. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,rutprt.Weld.C0.y+.2,1.75)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1)
  1398. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(rollvalue),0,0),.325)
  1399. end
  1400.  
  1401. if anim=="Jumping" then
  1402. trailing=false
  1403. if not armmovement then
  1404. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(-25),0,math.rad(25)),.1)
  1405. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(-25),0,math.rad(-25)),.1)
  1406. end
  1407. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,math.rad(5))*CFrame.Angles(math.rad(-5),0,math.rad(-2.5)),.1)
  1408. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,math.rad(5))*CFrame.Angles(math.rad(-5),0,math.rad(2.5)),.1)
  1409. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,.05)*CFrame.Angles(math.rad(15),0,0),.1)
  1410. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,rutprt.Weld.C0.y+.1,0)*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),.1)
  1411. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(rollvalue),0,0),.325)
  1412. end
  1413.  
  1414. if anim=="WallRun" then
  1415. chr.Humanoid.Jump=true
  1416. trailing=false
  1417. rollvalue=rollvalue+7
  1418. if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  1419. elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
  1420. else
  1421. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5)),.2) end
  1422. if not armmovement then
  1423. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.325,.525,.2)*CFrame.Angles(math.rad(-45),0,math.rad(3)),.1)
  1424. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.325,.525,.2)*CFrame.Angles(math.rad(-45),0,math.rad(-3)),.1)
  1425. end
  1426.  
  1427. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/5)/11)-.575,-1.8-math.cos(syne/2.5)/2+math.cos(syne/5)/6,math.rad(-30)-(math.cos(syne/5)))*CFrame.Angles(math.rad(30)+(math.cos(syne/5)),0,-(math.cos(syne/5)/11)+math.rad(-5)),.1)
  1428.  
  1429. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/5)/11)+.575,-1.8+math.cos(syne/2.5)/2-math.cos(syne/5)/6,math.rad(-30)+(math.cos(syne/5)))*CFrame.Angles(math.rad(30)-(math.cos(syne/5)),0,-(math.cos(syne/5)/11)+math.rad(5)),.1)
  1430.  
  1431. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.45,.25)*CFrame.Angles(math.rad(30),0,0),.1)
  1432. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-1-math.cos(syne/2.5)/2,2-math.cos(syne/3)*1.5)*CFrame.Angles(math.cos(syne/2.5)/10+math.rad(-3),math.cos(syne/2.5)/10,math.cos(syne/5)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
  1433. end
  1434.  
  1435.  
  1436. if anim=="Swimming" then
  1437. rollvalue=rollvalue+4
  1438. if rollvalue>=360 then rollvalue=0 end
  1439. if not armmovement then
  1440. rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/8)/6,math.cos(syne/8)/6)*CFrame.Angles(-math.cos(syne/8)/3+math.rad(25),0,math.rad(12.5)),.1)
  1441. larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/8)/6,-math.cos(syne/8)/6)*CFrame.Angles(math.cos(syne/8)/3+math.rad(25),0,math.rad(-12.5)),.1)
  1442. end
  1443.  
  1444. lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.7+math.cos(syne/4)/4,math.rad(-5)-(math.cos(syne/8)))*CFrame.Angles(math.rad(5)+(math.cos(syne/8)),0,math.rad(-5)),.1)
  1445.  
  1446. rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.7-math.cos(syne/4)/4,math.rad(-5)+(math.cos(syne/8)))*CFrame.Angles(math.rad(5)-(math.cos(syne/8)),0,math.rad(5)),.1)
  1447.  
  1448. bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,0),.25)
  1449. rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.4-math.cos(syne/4)/4,-math.cos(syne/4)*1.25)*CFrame.Angles(math.cos(syne/4)/10+math.rad(95),math.cos(syne/4)/10,math.cos(syne/8)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
  1450. end
  1451.  
  1452. chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
  1453.  
  1454. if runnin and not disabled and not otheranims and not sitting then
  1455. chr.Humanoid.WalkSpeed=RunSpeed
  1456. elseif not runnin and not disabled and not otheranims and not sitting then
  1457. chr.Humanoid.WalkSpeed=WlkSpeed
  1458. end
  1459.  
  1460. if rutprt:findFirstChild("WallRunningVelocitypls") and otheranims then
  1461. local rei=Ray.new((rutprt.CFrame).p,(((rutprt.CFrame*CFrame.new(0,0,-1)).p)-rutprt.CFrame.p).unit*((bawl.Size.y/2)))
  1462. local hitpart,hitpos=Workspace:FindPartOnRay(rei,chr)
  1463. if not hitpart then
  1464. otheranims=false
  1465. rutprt:findFirstChild("WallRunningVelocitypls"):Destroy''
  1466. else
  1467. return
  1468. end
  1469. end
  1470.  
  1471. if runnin and (fldb.w or fldb.a or fldb.s or fldb.d) then
  1472. local rei=Ray.new((rutprt.CFrame).p,(((rutprt.CFrame*CFrame.new(0,0,-1)).p)-rutprt.CFrame.p).unit*((bawl.Size.y/2)))
  1473. local hitpart,hitpos=Workspace:FindPartOnRay(rei,chr)
  1474. if hitpart and hitpart.CanCollide then
  1475. otheranims=true
  1476. anim="WallRun"
  1477. if not rutprt:findFirstChild("WallRunningVelocitypls") then
  1478. local wlvelo=Instance.new("BodyVelocity",rutprt)
  1479. wlvelo.Name="WallRunningVelocitypls"
  1480. wlvelo.maxForce=Vector3.new(0,math.huge,0)
  1481. wlvelo.velocity=Vector3.new(0,RunSpeed*1.2,0)
  1482. end
  1483. end
  1484. else
  1485. if rutprt:findFirstChild("WallRunningVelocitypls") and otheranims then
  1486. otheranims=false
  1487. rutprt:findFirstChild("WallRunningVelocitypls"):destroy''
  1488. end
  1489. end
  1490. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement