Advertisement
Mediakiller7Cool

AWW

Jul 19th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.67 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 V2 by Mokiros")
  6. local RealPlayer = RealPlayer
  7. script.Parent = RealPlayer.Character
  8.  
  9. --Fake event to make stuff like Mouse.KeyDown work
  10. local Disconnect_Function = function(this)
  11. this[1].Functions[this[2]] = nil
  12. end
  13. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  14. local FakeEvent_Metatable = {__index={
  15. Connect = function(this,f)
  16. local i = tostring(math.random(0,10000))
  17. while this.Functions[i] do
  18. i = tostring(math.random(0,10000))
  19. end
  20. this.Functions[i] = f
  21. return setmetatable({this,i},Disconnect_Metatable)
  22. end
  23. }}
  24. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  25. local function fakeEvent()
  26. return setmetatable({Functions={}},FakeEvent_Metatable)
  27. end
  28.  
  29. --Creating fake input objects with fake variables
  30. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  31. FakeMouse.keyUp = FakeMouse.KeyUp
  32. FakeMouse.keyDown = FakeMouse.KeyDown
  33. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  34. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  35. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  36. end}
  37. --Merged 2 functions into one by checking amount of arguments
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40. --This function will trigger the events that have been :Connect()'ed
  41. local function TriggerEvent(self,ev,...)
  42. for _,f in pairs(self[ev].Functions) do
  43. f(...)
  44. end
  45. end
  46. FakeMouse.TriggerEvent = TriggerEvent
  47. UIS.TriggerEvent = TriggerEvent
  48.  
  49. --Client communication
  50. local Event = Instance.new("RemoteEvent")
  51. Event.Name = "UserInput_Event"
  52. Event.OnServerEvent:Connect(function(plr,io)
  53. if plr~=RealPlayer then return end
  54. FakeMouse.Target = io.Target
  55. FakeMouse.Hit = io.Hit
  56. if not io.isMouse then
  57. local b = io.UserInputState == Enum.UserInputState.Begin
  58. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  59. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  60. end
  61. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  62. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  63. end
  64. for _,t in pairs(CAS.Actions) do
  65. for _,k in pairs(t.Keys) do
  66. if k==io.KeyCode then
  67. t.Function(t.Name,io.UserInputState,io)
  68. end
  69. end
  70. end
  71. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  72. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  73. end
  74. end)
  75. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  76. local Mouse = owner:GetMouse()
  77. local UIS = game:GetService("UserInputService")
  78. local input = function(io,RobloxHandled)
  79. if RobloxHandled then return end
  80. --Since InputObject is a client-side instance, we create and pass table instead
  81. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  82. end
  83. UIS.InputBegan:Connect(input)
  84. UIS.InputEnded:Connect(input)
  85. local h,t
  86. --Give the server mouse data every second frame, but only if the values changed
  87. --If player is not moving their mouse, client won't fire events
  88. local HB = game:GetService("RunService").Heartbeat
  89. while true do
  90. if h~=Mouse.Hit or t~=Mouse.Target then
  91. h,t=Mouse.Hit,Mouse.Target
  92. Event:FireServer({isMouse=true,Target=t,Hit=h})
  93. end
  94. --Wait 2 frames
  95. for i=1,2 do
  96. HB:Wait()
  97. end
  98. end]==],script)
  99.  
  100. ----Sandboxed game object that allows the usage of client-side methods and services
  101. --Real game object
  102. local RealGame = game
  103.  
  104. --Metatable for fake service
  105. local FakeService_Metatable = {
  106. __index = function(self,k)
  107. local s = rawget(self,"_RealService")
  108. if s then
  109. return typeof(s[k])=="function"
  110. and function(_,...)return s[k](s,...)end or s[k]
  111. end
  112. end,
  113. __newindex = function(self,k,v)
  114. local s = rawget(self,"_RealService")
  115. if s then s[k]=v end
  116. end
  117. }
  118. local function FakeService(t,RealService)
  119. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  120. return setmetatable(t,FakeService_Metatable)
  121. end
  122.  
  123. --Fake game object
  124. local FakeGame = {
  125. GetService = function(self,s)
  126. return rawget(self,s) or RealGame:GetService(s)
  127. end,
  128. Players = FakeService({
  129. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  130. },"Players"),
  131. UserInputService = FakeService(UIS,"UserInputService"),
  132. ContextActionService = FakeService(CAS,"ContextActionService"),
  133. RunService = FakeService({
  134. _btrs = {},
  135. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  136. BindToRenderStep = function(self,name,_,fun)
  137. self._btrs[name] = self.Heartbeat:Connect(fun)
  138. end,
  139. UnbindFromRenderStep = function(self,name)
  140. self._btrs[name]:Disconnect()
  141. end,
  142. },"RunService")
  143. }
  144. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  145. FakeGame.service = FakeGame.GetService
  146. FakeService(FakeGame,game)
  147. --Changing owner to fake player object to support owner:GetMouse()
  148. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  149. end
  150. --------FEEE----------------
  151. print([[
  152. ___________________________________
  153.  
  154. Booty Offender // A Kyutatsuki13's script
  155. Build 0001
  156. Credit to Ethanhong that gave me this idea ;)
  157. https://discord.gg/DueqyJ8
  158.  
  159. ___________________________________
  160. ]])
  161.  
  162. warn("You're whitelisted, "..game:GetService("Players").LocalPlayer.Name.." :)")
  163.  
  164. local p = game:GetService("Players").LocalPlayer
  165. local char = p.Character
  166. local mouse = p:GetMouse()
  167. local larm = char:WaitForChild("Left Arm")
  168. local rarm = char:WaitForChild("Right Arm")
  169. local lleg = char:WaitForChild("Left Leg")
  170. local rleg = char:WaitForChild("Right Leg")
  171. local hed = char:WaitForChild("Head")
  172. local torso = char:WaitForChild("Torso")
  173. local root = char:WaitForChild("HumanoidRootPart")
  174. local hum = char:FindFirstChildOfClass("Humanoid")
  175. local debris = game:GetService("Debris")
  176. local input = game:GetService("UserInputService")
  177. local run = game:GetService("RunService")
  178. local rs = run.RenderStepped
  179. local wingpose = "Idle"
  180. local DebrisModel = Instance.new("Model",char)
  181. DebrisModel.Name = "Debris"
  182. repeat rs:wait() until p.CharacterAppearanceLoaded
  183.  
  184. noidle = false
  185. shift = false
  186. control = false
  187.  
  188. ----------------------------------------------------------------------------
  189.  
  190. function rswait(value)
  191. if value ~= nil and value ~= 0 then
  192. for i=1,value do
  193. rs:wait()
  194. end
  195. else
  196. rs:wait()
  197. end
  198. end
  199.  
  200. ----------------------------------------------------------------------------
  201.  
  202. local timeposition = 0
  203.  
  204. function music(id)
  205. if id == "Stop" then
  206. if not torso:FindFirstChild("MusicRuin") then
  207. soundz = Instance.new("Sound",torso)
  208. end
  209. soundz:Stop()
  210. else
  211. if not torso:FindFirstChild("MusicRuin") then
  212. soundz = Instance.new("Sound",torso)
  213. for i=1,2 do
  214. local equalizer = Instance.new("EqualizerSoundEffect",soundz)
  215. equalizer.HighGain = 6
  216. equalizer.MidGain = 0
  217. equalizer.LowGain = 6
  218. end
  219. end
  220. soundz.Volume = 10
  221. soundz.Name = "MusicRuin"
  222. soundz.Looped = true
  223. soundz.PlaybackSpeed = 1
  224. soundz.SoundId = "rbxassetid://"..id
  225. soundz:Stop()
  226. soundz:Play()
  227. end
  228. end
  229.  
  230. ----------------------------------------------------------------------------
  231.  
  232. function lerp(a, b, t)
  233. return a + (b - a)*t
  234. end
  235.  
  236. ----------------------------------------------------------------------------
  237.  
  238. function Lerp(c1,c2,al)
  239. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  240. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  241. for i,v in pairs(com1) do
  242. com1[i] = v+(com2[i]-v)*al
  243. end
  244. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  245. end
  246.  
  247. ----------------------------------------------------------------------------
  248.  
  249. function slerp(a, b, t)
  250. dot = a:Dot(b)
  251. if dot > 0.99999 or dot < -0.99999 then
  252. return t <= 0.5 and a or b
  253. else
  254. r = math.acos(dot)
  255. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  256. end
  257. end
  258.  
  259. ----------------------------------------------------------------------------
  260.  
  261. function clerp(c1,c2,al)
  262.  
  263. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  264.  
  265. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  266.  
  267. for i,v in pairs(com1) do
  268.  
  269. com1[i] = lerp(v,com2[i],al)
  270.  
  271. end
  272.  
  273. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  274.  
  275. end
  276.  
  277. ----------------------------------------------------------------------------
  278.  
  279. function findAllNearestTorso(pos,dist)
  280. local list = workspace:children()
  281. local torso = {}
  282. local temp = nil
  283. local human = nil
  284. local temp2 = nil
  285. for x = 1, #list do
  286. temp2 = list[x]
  287. if (temp2.className == "Model") and (temp2 ~= char) then
  288. temp = temp2:findFirstChild("Torso")
  289. human = temp2:findFirstChildOfClass("Humanoid")
  290. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  291. if (temp.Position - pos).magnitude < dist then
  292. table.insert(torso,temp)
  293. dist = (temp.Position - pos).magnitude
  294. end
  295. end
  296. end
  297. end
  298. return torso
  299. end
  300.  
  301. ----------------------------------------------------------------------------
  302.  
  303. function checkIfNotPlayer(model)
  304. if model.CanCollide == true and model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel and model ~= wings and model.Parent ~= wings and model.Parent.Parent ~= wings then
  305. return true
  306. else
  307. return false
  308. end
  309. end
  310.  
  311. ----------------------------------------------------------------------------
  312.  
  313. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  314.  
  315. local wld = Instance.new("Weld", wp1)
  316.  
  317. wld.Part0 = wp0
  318.  
  319. wld.Part1 = wp1
  320.  
  321. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  322.  
  323. return wld
  324.  
  325. end
  326.  
  327. function weld(model)
  328. local parts,last = {}
  329. local function scan(parent)
  330. for _,v in pairs(parent:GetChildren()) do
  331. if (v:IsA("BasePart")) then
  332. if (last) then
  333. local w = Instance.new("Weld")
  334. w.Name = ("%s_Weld"):format(v.Name)
  335. w.Part0,w.Part1 = last,v
  336. w.C0 = last.CFrame:inverse()
  337. w.C1 = v.CFrame:inverse()
  338. w.Parent = last
  339. end
  340. last = v
  341. table.insert(parts,v)
  342. end
  343. scan(v)
  344. end
  345. end
  346. scan(model)
  347. for _,v in pairs(parts) do
  348. v.Anchored = false
  349. v.Locked = true
  350. v.Anchored = false
  351. v.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  352. v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  353. v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  354. v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  355. v.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  356. v.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  357. v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0)
  358. end
  359. end
  360.  
  361. ----------------------------------------------------------------------------
  362.  
  363. function calculate(part,asd)
  364. local Head = hed
  365. local RightShoulder = asd
  366. local RightArm = part
  367. local MousePosition = mouse.Hit.p
  368. local ToMouse = (MousePosition - Head.Position).unit
  369. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  370. local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0)))
  371. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  372. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  373. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  374. if tostring(LateralAngle) == "-1.#IND" then
  375. LateralAngle = 0
  376. end
  377. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  378. if LateralAngle > (math.pi / 2) then
  379. LateralAngle = (math.pi / 2)
  380. local Torso = root
  381. local Point = Torso.CFrame:vectorToObjectSpace(mouse.Hit.p-Torso.CFrame.p)
  382. if Point.Z > 0 then
  383. if Point.X > -0 and RightArm == rarm then
  384. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(110),0)
  385. elseif Point.X < 0 and RightArm == rarm then
  386. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(-110),0)
  387. end
  388. end
  389. end
  390. if Cross.Y < 0 then
  391. LateralAngle = -LateralAngle
  392. end
  393. return(CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  394. end
  395.  
  396. ----------------------------------------------------------------------------
  397.  
  398. function sound(id,position,vol,pitch,start,finish)
  399. coroutine.resume(coroutine.create(function()
  400.  
  401. local part = Instance.new("Part",workspace)
  402. part.Position = position
  403. part.Size = Vector3.new(0,0,0)
  404. part.CanCollide = false
  405. part.Transparency = 1
  406.  
  407. local sound = Instance.new("Sound",part)
  408.  
  409. sound.SoundId = "rbxassetid://"..id
  410.  
  411. repeat rs:wait() until sound.IsLoaded
  412.  
  413. if vol ~= nil then
  414. sound.Volume = vol
  415. end
  416.  
  417. if pitch ~= nil then
  418. sound.PlaybackSpeed = pitch
  419. end
  420.  
  421. if start ~= nil then
  422. sound.TimePosition = start
  423. end
  424.  
  425. if finish ~= nil then
  426. debris:AddItem(part,finish-start)
  427. else
  428. debris:AddItem(part,sound.TimeLength)
  429. end
  430.  
  431. sound:Play()
  432.  
  433. return sound
  434.  
  435. end))
  436. end
  437.  
  438. ----------------------------------------------------------------------------
  439.  
  440. function computeDirection(vec)
  441. local lenSquared = vec.magnitude * vec.magnitude
  442. local invSqrt = 1 / math.sqrt(lenSquared)
  443. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  444. end
  445.  
  446. ----------------------------------------------------------------------------
  447.  
  448. local shaking = 0
  449. function shake(num) if num > shaking then shaking = num end end
  450. game:GetService("RunService").RenderStepped:connect(function()
  451. hum.CameraOffset = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))*(shaking/100)
  452. if shaking > 0 then shaking = shaking - 1 else shaking = 0 end
  453. end)
  454.  
  455. plr = game:GetService("Players").LocalPlayer
  456. DebrisModel = Instance.new("Model",plr.Character)
  457. DebrisModel.Name = "DebrisModel"
  458.  
  459. function Effect(mesh,size,transparency,material,color,position,rotation,positionchange,sizechange,rotationchange,transparencychange,acceleration)
  460.  
  461. local part = Instance.new("Part",DebrisModel)
  462. part.Anchored = true
  463. part.CanCollide = false
  464. part.Size = Vector3.new(1,1,1)
  465. part.Transparency = transparency
  466. part.Material = material
  467. part.Color = color
  468. part.CFrame = CFrame.new(position)*CFrame.Angles(math.rad(rotation.X),math.rad(rotation.Y),math.rad(rotation.Z))
  469.  
  470. local partmesh = Instance.new("SpecialMesh",part)
  471. if tonumber(mesh) == nil then partmesh.MeshType = mesh else partmesh.MeshId = "rbxassetid://"..mesh end
  472. partmesh.Scale = size
  473.  
  474. local pvalue = Instance.new("Vector3Value",part)
  475. pvalue.Name = "Position"
  476. pvalue.Value = positionchange
  477.  
  478. local svalue = Instance.new("Vector3Value",part)
  479. svalue.Name = "Size"
  480. svalue.Value = sizechange
  481.  
  482. local rvalue = Instance.new("Vector3Value",part)
  483. rvalue.Name = "Rotation"
  484. rvalue.Value = rotationchange
  485.  
  486. local tvalue = Instance.new("NumberValue",part)
  487. tvalue.Name = "Transparency"
  488. tvalue.Value = transparencychange
  489.  
  490. local avalue = Instance.new("NumberValue",part)
  491. avalue.Name = "Acceleration"
  492. avalue.Value = acceleration
  493.  
  494. part.Name = "EFFECT"
  495.  
  496. return part
  497.  
  498. end
  499.  
  500. game:GetService("RunService").RenderStepped:connect(function()
  501. coroutine.resume(coroutine.create(function()
  502.  
  503. for i, v in pairs(DebrisModel:GetChildren()) do
  504. if v:isA("BasePart") then
  505. v.LocalTransparencyModifier = 0
  506. end
  507. end
  508.  
  509. if not plr.Character:FindFirstChild("DebrisModel") then
  510. DebrisModel = Instance.new("Model",plr.Character)
  511. DebrisModel.Name = "DebrisModel"
  512. end
  513.  
  514. for i,v in pairs(DebrisModel:GetChildren()) do
  515. if v:IsA("BasePart") and v.Name == "EFFECT" then
  516. local pvalue = v:FindFirstChild("Position").Value
  517. local svalue = v:FindFirstChild("Size").Value
  518. local rvalue = v:FindFirstChild("Rotation").Value
  519. local tvalue = v:FindFirstChild("Transparency").Value
  520. local avalue = v:FindFirstChild("Acceleration").Value
  521. local mesh = v:FindFirstChild("Mesh")
  522. mesh.Scale = mesh.Scale + svalue
  523. v:FindFirstChild("Size").Value = v:FindFirstChild("Size").Value + (Vector3.new(1,1,1)*avalue)
  524. v.Transparency = v.Transparency + tvalue
  525. v.CFrame = CFrame.new(pvalue)*v.CFrame*CFrame.Angles(math.rad(rvalue.X),math.rad(rvalue.Y),math.rad(rvalue.Z))
  526. if v.Transparency >= 1 or mesh.Scale.X < 0 or mesh.Scale.Y < 0 or mesh.Scale.Z < 0 then
  527. v:Destroy()
  528. end
  529. end
  530. end
  531.  
  532. end))
  533. end)
  534.  
  535. local wsback = 0
  536. local frozen = false
  537. function freeze()
  538. if frozen == false then
  539. frozen = true
  540. wsback = hum.WalkSpeed
  541. hum.WalkSpeed = 1
  542. else
  543. frozen = false
  544. hum.WalkSpeed = wsback
  545. end
  546. end
  547. hum.WalkSpeed = 25
  548.  
  549. function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
  550. local magz = (Part0 - Part1).magnitude
  551. local curpos = Part0
  552. local trz = {-Offset,Offset}
  553. for i=1,Times do
  554. local li = Instance.new("Part", DebrisModel)
  555. li.TopSurface =0
  556. li.Material = Enum.Material.Neon
  557. li.BottomSurface = 0
  558. li.Anchored = true
  559. li.Locked = true
  560. li.Transparency = Trans or 0.4
  561. li.Color = Color
  562. li.formFactor = "Custom"
  563. li.CanCollide = false
  564. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  565. local lim = Instance.new("BlockMesh",li)
  566. local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  567. local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
  568. if Times == i then
  569. local magz2 = (curpos - Part1).magnitude
  570. li.Size = Vector3.new(Thickness,Thickness,magz2)
  571. li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
  572. else
  573. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  574. end
  575. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
  576. li.Name = "LIGHTNING"
  577. end
  578. end
  579.  
  580. ----------------------------------------------------------------------------
  581. skin_color = BrickColor.new("Light orange")
  582. --p:ClearCharacterAppearance()
  583. --hed:WaitForChild("face"):Destroy()
  584. hed:WaitForChild("face").Texture = "rbxassetid://407320095"
  585. ----------------------------------------------------------------------------
  586. local size = 1
  587.  
  588. newWeld(torso, larm, -1.5, 0.5, 0)
  589. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  590. newWeld(torso, rarm, 1.5, 0.5, 0)
  591. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  592. newWeld(torso, hed, 0, 1.5, 0)
  593. newWeld(torso, lleg, -0.5, -1, 0)
  594. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  595. newWeld(torso, rleg, 0.5, -1, 0)
  596. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  597. newWeld(root, torso, 0, -1, 0)
  598. torso.Weld.C1 = CFrame.new(0, -1, 0)
  599.  
  600. emitters={}
  601.  
  602. ----------------------------------------------------------------------------------------
  603. music(288494027)
  604. velocityYFall=0
  605. velocityYFall2=0
  606. velocityYFall3=0
  607. velocityYFall4=0
  608. neckrotY=0
  609. neckrotY2=0
  610. torsorotY=0
  611. torsorotY2=0
  612. torsoY=0
  613. torsoY2=0
  614. colored = 0
  615. sine = 0
  616. change=0.4
  617. movement=10
  618. timeranim=0
  619. running = false
  620. jumped = false
  621. icolor=1
  622. imode=false
  623.  
  624. didjump = false
  625. jumppower = 0
  626. debounceimpact = false
  627.  
  628. function jumpimpact()
  629. if debounceimpact == false then
  630. debounceimpact = true
  631. if jumppower < -150 then jumppower = -150 end
  632. shake(-jumppower/5)
  633. for i=1,-jumppower/20 do rs:wait()
  634. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.05)
  635. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, (jumppower/20)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.05)
  636. end
  637. debounceimpact = false
  638. end
  639. end
  640.  
  641. max = 0
  642.  
  643. rs:connect(function()
  644.  
  645. for i,v in pairs(DebrisModel:GetChildren()) do
  646. if v.Name == "LIGHTNING" then
  647. local vm = v:FindFirstChildOfClass("BlockMesh")
  648. vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0)
  649. if vm.Scale.X <= 0 then
  650. v:Destroy()
  651. end
  652. end
  653. end
  654.  
  655. if p.Character.Parent == nil then
  656. local model = Instance.new("Model")
  657. model.Name = p.Name
  658. p.Character = model
  659. for i,v in pairs(char:GetChildren()) do
  660. v.Parent = p.Character
  661. end
  662. end
  663.  
  664. char = p.Character
  665. if p.Character.Parent ~= workspace then
  666. p.Character.Parent = workspace
  667. end
  668. for i,v in pairs(char:GetChildren()) do
  669. if v:IsA("Accoutrement") then
  670. if v.Handle:FindFirstChild("Mesh") then
  671. v.Handle:FindFirstChild("Mesh").Offset = Vector3.new()
  672. v.Handle.Transparency = 0
  673. end
  674. elseif v:IsA("BasePart") then
  675. v.Anchored = false
  676. if v:FindFirstChildOfClass("BodyPosition") then
  677. v:FindFirstChildOfClass("BodyPosition"):Destroy()
  678. end
  679. if v:FindFirstChildOfClass("BodyVelocity") then
  680. v:FindFirstChildOfClass("BodyVelocity"):Destroy()
  681. end
  682. if v:FindFirstChildOfClass("BodyGyro") and v:FindFirstChildOfClass("BodyGyro").Name ~= "lolnochara" then
  683. v:FindFirstChildOfClass("BodyGyro"):Destroy()
  684. end
  685. if v:FindFirstChild("Mesh") then
  686. v:FindFirstChild("Mesh").Offset = Vector3.new()
  687. end
  688. if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD") then
  689. local force = Instance.new("Part",DebrisModel)
  690. force.Name = v.Name.."FORCEFIELD"
  691. if v ~= hed then
  692. force.Size = v.Size+(Vector3.new(1,1,1)*0.2)
  693. else
  694. force.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
  695. end
  696. force.CanCollide = false
  697. force.Transparency = 1
  698. force.Color = Color3.new(0,1,1)
  699. force.Material = Enum.Material.Neon
  700. newWeld(v,force,0,0,0)
  701. else
  702. if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"):FindFirstChildOfClass("Weld") then
  703. newWeld(v,DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"),0,0,0)
  704. end
  705. end
  706. if v.Name ~= "HumanoidRootPart" then
  707. v.Transparency = 0
  708. else
  709. v.Transparency = 1
  710. end
  711. end
  712. end
  713.  
  714. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 150 then
  715. velocityYFall = root.Velocity.Y/1.5
  716. else
  717. if -root.Velocity.Y/1.5 < -5 then
  718. velocityYFall = 5
  719. elseif -root.Velocity.Y/1.5 > 150 then
  720. velocityYFall = -150
  721. end
  722. end
  723.  
  724. if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
  725. velocityYFall2 = root.Velocity.Y/180
  726. else
  727. if -root.Velocity.Y/180 < 0 then
  728. velocityYFall2 = 0
  729. elseif -root.Velocity.Y/180 > 1.2 then
  730. velocityYFall2 = -1.2
  731. end
  732. end
  733.  
  734. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
  735. velocityYFall3 = root.Velocity.Y/1.5
  736. else
  737. if -root.Velocity.Y/1.5 < -5 then
  738. velocityYFall3 = 5
  739. elseif -root.Velocity.Y/1.5 > 50 then
  740. velocityYFall3 = -50
  741. end
  742. end
  743.  
  744. if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
  745. velocityYFall4 = root.Velocity.Y/1.5
  746. else
  747. if -root.Velocity.Y/180 < -5 then
  748. velocityYFall4 = 5
  749. elseif -root.Velocity.Y/180 > 50 then
  750. velocityYFall4 = -50
  751. end
  752. end
  753.  
  754. if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
  755. neckrotY = root.RotVelocity.Y/6
  756. else
  757. if root.RotVelocity.Y/6 < -1 then
  758. neckrotY = -1
  759. elseif root.RotVelocity.Y/6 > 1 then
  760. neckrotY = 1
  761. end
  762. end
  763.  
  764. if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
  765. neckrotY2 = root.RotVelocity.Y/8
  766. else
  767. if root.RotVelocity.Y/8 < -0.6 then
  768. neckrotY2 = -0.6
  769. elseif root.RotVelocity.Y/8 > 0.6 then
  770. neckrotY2 = 0.6
  771. end
  772. end
  773.  
  774. if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
  775. torsorotY = root.RotVelocity.Y/6
  776. else
  777. if root.RotVelocity.Y/6 < -0.2 then
  778. torsorotY = -0.2
  779. elseif root.RotVelocity.Y/6 > 0.2 then
  780. torsorotY = 0.2
  781. end
  782. end
  783.  
  784. if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
  785. torsorotY2 = root.RotVelocity.Y/8
  786. else
  787. if root.RotVelocity.Y/8 < -0.2 then
  788. torsorotY2 = -0.2
  789. elseif root.RotVelocity.Y/8 > 0.2 then
  790. torsorotY2 = 0.2
  791. end
  792. end
  793.  
  794. torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
  795. torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
  796.  
  797. local ray1 = Ray.new(root.Position+Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  798. local part1, endPoint = workspace:FindPartOnRay(ray1, char)
  799.  
  800. local ray2 = Ray.new(root.Position-Vector3.new(size,0,0),Vector3.new(0, -4, 0))
  801. local part2, endPoint = workspace:FindPartOnRay(ray2, char)
  802.  
  803. local ray3 = Ray.new(root.Position+Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  804. local part3, endPoint = workspace:FindPartOnRay(ray3, char)
  805.  
  806. local ray4 = Ray.new(root.Position-Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
  807. local part4, endPoint = workspace:FindPartOnRay(ray4, char)
  808.  
  809. local ray5 = Ray.new(root.Position+Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  810. local part5, endPoint = workspace:FindPartOnRay(ray5, char)
  811.  
  812. local ray6 = Ray.new(root.Position-Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
  813. local part6, endPoint = workspace:FindPartOnRay(ray6, char)
  814.  
  815. local ray7 = Ray.new(root.Position+Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  816. local part7, endPoint = workspace:FindPartOnRay(ray7, char)
  817.  
  818. local ray8 = Ray.new(root.Position-Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
  819. local part8, endPoint = workspace:FindPartOnRay(ray8, char)
  820.  
  821. local ray = Ray.new(root.Position,Vector3.new(0, -6, 0))
  822. local part, endPoint = workspace:FindPartOnRay(ray, char)
  823.  
  824. if part1 or part2 or part3 or part4 or part5 or part6 or part7 or part8 then jumped = false else endPoint = 0 jumped = true end
  825.  
  826. local rlegray = Ray.new(rleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  827. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  828.  
  829. local llegray = Ray.new(lleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
  830. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  831.  
  832. if hum.Health > 0 and noidle == false then
  833. if hum.Sit == false then
  834. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
  835. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.2) * CFrame.Angles(math.rad((torso.Velocity*Vector3.new(1, 0, 1)).magnitude/35),torsorotY, math.rad(0)+torsorotY), 0.4)
  836. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles((change/10)*math.cos(sine/2)+0.1,-(change/10)*math.cos(sine/4)-(torsorotY/5),(change/5)*math.cos(sine/4)), 0.1)
  837. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/40)*math.cos(sine/4)/3,(movement/150)+(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  838. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/40)*math.cos(sine/4)/3,(movement/150)-(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  839. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -0.5+(change*2)*math.sin(sine/2), 0) * CFrame.Angles(math.rad(30+(change*20)-(movement/20)*math.cos(sine/2)), torsorotY2+math.rad(0-20*math.sin(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1)
  840. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,(-0.85-(movement/15)*math.cos(sine/4)/2),-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  841. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,(-0.85+(movement/15)*math.cos(sine/4)/2),-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
  842. elseif jumped == true then
  843. didjump = true
  844. jumppower = root.Velocity.Y
  845. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1) * CFrame.Angles(0,0,0), 0.4)
  846. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.1)
  847. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  848. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  849. torso.Weld.C0 = CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(math.random(-90,90)),math.rad(0), math.rad(math.random(-180,180)))
  850. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  851. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0,-0.8) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
  852. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
  853. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  854. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(0+50*math.sin(sine/4)),0,0), 0.1)
  855. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(-5-5*math.sin(sine/8)),math.rad(-6+2*math.cos(sine/8))), 0.2)
  856. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(5+5*math.sin(sine/8)),math.rad(6-2*math.cos(sine/8))), 0.2)
  857. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1-hum.HipHeight, 0+2*math.cos(sine/4)) * CFrame.Angles(math.rad(0-80*math.cos(sine/4)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  858. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(10),math.rad(-5+1*math.cos(sine/16))), 0.1)
  859. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(-10),math.rad(5+1*math.cos(sine/16))), 0.1)
  860. end
  861.  
  862. else
  863. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
  864. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0.05*math.sin(sine/16)+0.15,0.05*math.cos(sine/32),0.01*math.cos(sine/32)), 0.1)
  865. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(-5-5*math.sin(sine/16)),math.rad(-6+2*math.cos(sine/16))), 0.2)
  866. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(5+5*math.sin(sine/16)),math.rad(6-2*math.cos(sine/16))), 0.2)
  867. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.4-(0.1)*math.cos(sine/16)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
  868. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(4),math.rad(-2+1*math.cos(sine/32))), 0.2)
  869. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(-4),math.rad(2+1*math.cos(sine/32))), 0.2)
  870. end
  871.  
  872. end
  873. if didjump == true and jumped == false and jumppower < 0 then
  874. didjump = false
  875. jumpimpact()
  876. end
  877.  
  878. sine = sine + change
  879. hum.Health = math.huge
  880. hum.MaxHealth = math.huge
  881. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement