Advertisement
13242

Untitled

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