Advertisement
HenloMyDude

gamer

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