Advertisement
Hermaxs

Untitled

Nov 8th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.16 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. --just put this on the top of a script and boom 89% works
  9. --note this does not work on big scripts
  10. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  11. local Player,game,owner = owner,game
  12. local RealPlayer = Player
  13. do
  14. local rp = RealPlayer
  15. script.Parent = rp.Character
  16.  
  17. --RemoteEvent for communicating
  18. local Event = Instance.new("RemoteEvent")
  19. Event.Name = "UserInput_Event"
  20.  
  21. --Fake event to make stuff like Mouse.KeyDown work
  22. local function fakeEvent()
  23. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  24. t.connect = t.Connect
  25. return t
  26. end
  27.  
  28. --Creating fake input objects with fake variables
  29. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  30. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  31. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  32. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  33. end}
  34. --Merged 2 functions into one by checking amount of arguments
  35. CAS.UnbindAction = CAS.BindAction
  36.  
  37. --This function will trigger the events that have been :Connect()'ed
  38. local function te(self,ev,...)
  39. local t = m[ev]
  40. if t and t._fakeEvent then
  41. for _,f in pairs(t.Functions) do
  42. f(...)
  43. end
  44. end
  45. end
  46. m.TrigEvent = te
  47. UIS.TrigEvent = te
  48.  
  49. Event.OnServerEvent:Connect(function(plr,io)
  50. if plr~=rp then return end
  51. m.Target = io.Target
  52. m.Hit = io.Hit
  53. if not io.isMouse then
  54. local b = io.UserInputState == Enum.UserInputState.Begin
  55. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  56. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  57. end
  58. for _,t in pairs(CAS.Actions) do
  59. for _,k in pairs(t.Keys) do
  60. if k==io.KeyCode then
  61. t.Function(t.Name,io.UserInputState,io)
  62. end
  63. end
  64. end
  65. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  66. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  67. end
  68. end)
  69. Event.Parent = NLS([==[
  70. local Player = game:GetService("Players").LocalPlayer
  71. local Event = script:WaitForChild("UserInput_Event")
  72.  
  73. local Mouse = Player:GetMouse()
  74. local UIS = game:GetService("UserInputService")
  75. local input = function(io,a)
  76. if a then return end
  77. --Since InputObject is a client-side instance, we create and pass table instead
  78. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  79. end
  80. UIS.InputBegan:Connect(input)
  81. UIS.InputEnded:Connect(input)
  82.  
  83. local h,t
  84. --Give the server mouse data 30 times every second, but only if the values changed
  85. --If player is not moving their mouse, client won't fire events
  86. while wait(1/30) do
  87. if h~=Mouse.Hit or t~=Mouse.Target then
  88. h,t=Mouse.Hit,Mouse.Target
  89. Event:FireServer({isMouse=true,Target=t,Hit=h})
  90. end
  91. end]==],Player.Character)
  92.  
  93. ----Sandboxed game object that allows the usage of client-side methods and services
  94. --Real game object
  95. local _rg = game
  96.  
  97. --Metatable for fake service
  98. local fsmt = {
  99. __index = function(self,k)
  100. local s = rawget(self,"_RealService")
  101. if s then return s[k] end
  102. end,
  103. __newindex = function(self,k,v)
  104. local s = rawget(self,"_RealService")
  105. if s then s[k]=v end
  106. end,
  107. __call = function(self,...)
  108. local s = rawget(self,"_RealService")
  109. if s then return s(...) end
  110. end
  111. }
  112. local function FakeService(t,RealService)
  113. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  114. return setmetatable(t,fsmt)
  115. end
  116.  
  117. --Fake game object
  118. local g = {
  119. GetService = function(self,s)
  120. return self[s]
  121. end,
  122. Players = FakeService({
  123. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  124. },"Players"),
  125. UserInputService = FakeService(UIS,"UserInputService"),
  126. ContextActionService = FakeService(CAS,"ContextActionService"),
  127. }
  128. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  129. g.service = g.GetService
  130.  
  131. g.RunService = FakeService({
  132. RenderStepped = _rg:GetService("RunService").Heartbeat,
  133. BindToRenderStep = function(self,name,_,fun)
  134. self._btrs[name] = self.Heartbeat:Connect(fun)
  135. end,
  136. UnbindFromRenderStep = function(self,name)
  137. self._btrs[name]:Disconnect()
  138. end,
  139. },"RunService")
  140.  
  141. setmetatable(g,{
  142. __index=function(self,s)
  143. return _rg:GetService(s) or typeof(_rg[s])=="function"
  144. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  145. end,
  146. __newindex = fsmt.__newindex,
  147. __call = fsmt.__call
  148. })
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = g,g.Players.LocalPlayer
  151. end
  152. ---
  153. local p = game.Players.LocalPlayer
  154. local char = p.Character
  155. local mouse = p:GetMouse()
  156. local larm = char["Left Arm"]
  157. local rarm = char["Right Arm"]
  158. local lleg = char["Left Leg"]
  159. local rleg = char["Right Leg"]
  160. local hed = char.Head
  161. local torso = char.Torso
  162. local ASD = BrickColor.new("Pastel brown")
  163. local hum = char.Humanoid
  164. local cam = game.Workspace.CurrentCamera
  165. local root = char.HumanoidRootPart
  166. local deb = false
  167. local shot = 0
  168. local l = game:GetService("Lighting")
  169. local rs = game:GetService("RunService").RenderStepped
  170. local stanceToggle = "Normal"
  171. math.randomseed(os.time())
  172. hum.WalkSpeed = 7
  173. char.Health:Destroy()
  174. hum.MaxHealth = 5000000
  175. wait(0.1)
  176. hum.Health = 5000000
  177. z = Instance.new("Sound", char.Torso)
  178. z.SoundId = "rbxassetid://719841541"
  179. z.Looped = true
  180. z.Pitch = 1
  181. z.Volume = 1
  182. ----------------------------------------------------
  183. local SM = Instance.new("Smoke",torso)
  184. SM.Size = 15
  185. local S = Instance.new("Part",char)
  186. S.Size = Vector3.new(1,1,1)
  187. S.Material = "Neon"
  188. S.BrickColor = BrickColor.new("Really black")
  189. S.Transparency = 0
  190. S.Anchored = true
  191. S.CFrame = torso.CFrame*CFrame.new(0,0,0)
  192. local Ring = Instance.new("Part",S)
  193. Ring.Size = Vector3.new(1,1,1)
  194. Ring.BrickColor = BrickColor.new("Really black")
  195. Ring.Anchored = true
  196. Ring.CanCollide = false
  197. Ring.CFrame = S.CFrame*CFrame.new(0,0,0)*CFrame.Angles(1.55,0,0)
  198. local Ring2 = Instance.new("SpecialMesh",Ring)
  199. Ring2.MeshId = "rbxassetid://3270017"
  200. Ring2.Scale = Vector3.new(0.1,0.1,0.1)
  201. local S2 = Instance.new("SpecialMesh",S)
  202. S2.MeshType = "Sphere"
  203. S2.Scale = Vector3.new(1,1,1)
  204. v = Instance.new("Sound")
  205. v.SoundId = "rbxassetid://821439273"
  206. v.Parent = char.Torso
  207. v.Looped = false
  208. v.Pitch = 1
  209. v.Volume = 1
  210. wait(.01)
  211. v:Play()
  212. local partasdeff = Instance.new("ParticleEmitter",S)
  213. partasdeff.Color = ColorSequence.new(Color3.new(0,0,0), Color3.new(204,130,2))
  214. partasdeff.LightEmission = .1
  215. partasdeff.Size = NumberSequence.new(0.2)
  216. partasdeff.Texture = "http://www.roblox.com/asset/?ID=300899516"
  217. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)})
  218. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  219. partasdeff.Transparency = bbb
  220. partasdeff.Size = aaa
  221. partasdeff.ZOffset = .9
  222. partasdeff.Acceleration = Vector3.new(0, -5, 0)
  223. partasdeff.LockedToPart = false
  224. partasdeff.EmissionDirection = "Top"
  225. partasdeff.Lifetime = NumberRange.new(1, 2)
  226. partasdeff.Rate = 1000
  227. partasdeff.Rotation = NumberRange.new(-100, 100)
  228. partasdeff.RotSpeed = NumberRange.new(-100, 100)
  229. partasdeff.Speed = NumberRange.new(10)
  230. partasdeff.VelocitySpread = 300
  231. partasdeff.Enabled = true
  232. for i = 1,100 do
  233. Ring2.Scale = Ring2.Scale + Vector3.new(2,2,2)
  234. Ring.Transparency = Ring.Transparency + 0.01
  235. S2.Scale = S2.Scale + Vector3.new(0.3,0.3,0.3)
  236. S.Transparency = S.Transparency + 0.01
  237. game:GetService("RunService").RenderStepped:wait()
  238. end
  239. S:remove()
  240. wait(1)
  241. SM:remove()
  242. ----------------------------------------------------
  243. Debounces = {
  244. on = false;
  245. ks = false;
  246. CanAttack = true;
  247. CanJoke = true;
  248. NoIdl = false;
  249. Slashing = false;
  250. Slashed = false;
  251. Grabbing = false;
  252. Grabbed = false;
  253. }
  254. local Touche = {char.Name, }
  255. ----------------------------------------------------
  256. function lerp(a, b, t) -- Linear interpolation
  257. return a + (b - a)*t
  258. end
  259.  
  260. function slerp(a, b, t) --Spherical interpolation
  261. dot = a:Dot(b)
  262. if dot > 0.99999 or dot < -0.99999 then
  263. return t <= 0.5 and a or b
  264. else
  265. r = math.acos(dot)
  266. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  267. end
  268. end
  269.  
  270. function matrixInterpolate(a, b, t)
  271. local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
  272. local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
  273. local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
  274. local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
  275. local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
  276. local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
  277. local t = v1:Dot(v2)
  278. if not (t < 0 or t == 0 or t > 0) then -- Failsafe
  279. return CFrame.new()
  280. end
  281. return CFrame.new(
  282. v0.x, v0.y, v0.z,
  283. v1.x, v1.y, v1.z,
  284. v2.x, v2.y, v2.z,
  285. v3.x, v3.y, v3.z)
  286. end
  287. ----------------------------------------------------
  288. function genWeld(a,b)
  289. local w = Instance.new("Weld",a)
  290. w.Part0 = a
  291. w.Part1 = b
  292. return w
  293. end
  294. function weld(a, b)
  295. local weld = Instance.new("Weld")
  296. weld.Name = "W"
  297. weld.Part0 = a
  298. weld.Part1 = b
  299. weld.C0 = a.CFrame:inverse() * b.CFrame
  300. weld.Parent = a
  301. return weld;
  302. end
  303. ----------------------------------------------------
  304. function Lerp(c1,c2,al)
  305. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  306. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  307. for i,v in pairs(com1) do
  308. com1[i] = v+(com2[i]-v)*al
  309. end
  310. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  311. end
  312. ----------------------------------------------------
  313. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  314. local wld = Instance.new("Weld", wp1)
  315. wld.Part0 = wp0
  316. wld.Part1 = wp1
  317. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  318. end
  319. ----------------------------------------------------
  320. for i,v in pairs(char:children()) do
  321. if v:IsA("Hat") then
  322. v:Destroy()
  323. end
  324. end
  325. for i,v in pairs(hed:children()) do
  326. if v:IsA("Sound") then
  327. v:Destroy()
  328. end
  329. end
  330. ----------------------------------------------------
  331. function HasntTouched(plrname)
  332. local ret = true
  333. for _, v in pairs(Touche) do
  334. if v == plrname then
  335. ret = false
  336. end
  337. end
  338. return ret
  339. end
  340. ----------------------------------------------------
  341. larm.Size = larm.Size * 5
  342. rarm.Size = rarm.Size * 5
  343. lleg.Size = lleg.Size * 5
  344. rleg.Size = rleg.Size * 5
  345. torso.Size = torso.Size * 5
  346. hed.Size = hed.Size * 5
  347. root.Size = root.Size * 5
  348. ----------------------------------------------------
  349. newWeld(torso, larm, -1.5, 0.5, 0)
  350. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  351. newWeld(torso, rarm, 1.5, 0.5, 0)
  352. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  353. newWeld(torso, hed, 0, 1.5, 0)
  354. newWeld(torso, lleg, -0.5, -1, 0)
  355. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  356. newWeld(torso, rleg, 0.5, -1, 0)
  357. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  358. newWeld(root, torso, 0, -1, 0)
  359. torso.Weld.C1 = CFrame.new(0, -1, 0)
  360. ----------------------------------------------------Light stone grey ---- 8560915 ---shirt 46810244 -- 55631376
  361.  
  362. --------------------------------
  363. k = Instance.new("Sound",Character)
  364. k.Volume = 0.6
  365. k.PlaybackSpeed = 1
  366. k.Pitch = 1
  367. k.SoundId = "rbxassetid://381671754"
  368. k:Play()
  369. k.Name = "TalkSound"
  370. k.Playing = false
  371.  
  372. function chatfunc(text)
  373. local chat = coroutine.wrap(function()
  374. if Character:FindFirstChild("TalkingBillBoard")~= nil then
  375. Character:FindFirstChild("TalkingBillBoard"):destroy()
  376. end
  377. local naeeym2 = Instance.new("BillboardGui",Character)
  378. naeeym2.Size = UDim2.new(0,100,0,40)
  379. naeeym2.StudsOffset = Vector3.new(0,8,0)
  380. naeeym2.Adornee = Character.Head
  381. naeeym2.Name = "TalkingBillBoard"
  382. naeeym2.AlwaysOnTop = true
  383. local tecks2 = Instance.new("TextLabel",naeeym2)
  384. tecks2.BackgroundTransparency = 1
  385. tecks2.BorderSizePixel = 0
  386. tecks2.Text = ""
  387. tecks2.Font = "Fantasy"
  388. tecks2.TextSize = 30
  389. tecks2.TextStrokeTransparency = 0
  390. tecks2.TextColor3 = Color3.new(0,0,0)
  391. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  392. tecks2.Size = UDim2.new(1,0,0.5,0)
  393. local tecks3 = Instance.new("TextLabel",naeeym2)
  394. tecks3.BackgroundTransparency = 1
  395. tecks3.BorderSizePixel = 0
  396. tecks3.Text = ""
  397. tecks3.Font = "Fantasy"
  398. tecks3.TextSize = 30
  399. tecks3.TextStrokeTransparency = 0
  400. tecks3.TextColor3 = Color3.new(0,0,0)
  401. tecks3.TextStrokeColor3 = Color3.new(0,0,0)
  402. tecks3.Size = UDim2.new(1,0,0.5,0)
  403. for i = 1,string.len(text),1 do
  404. k:Play()
  405. tecks2.Text = string.sub(text,1,i)
  406. tecks3.Text = string.sub(text,1,i)
  407. wait(0.01)
  408. end
  409. wait(2)
  410. for i = 1, 50 do
  411. wait()
  412. tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
  413. tecks2.Rotation = tecks2.Rotation - .8
  414. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  415. tecks2.TextTransparency = tecks2.TextTransparency + .04
  416. tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
  417. tecks3.Rotation = tecks2.Rotation + .8
  418. tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  419. tecks3.TextTransparency = tecks2.TextTransparency + .04
  420. end
  421. naeeym2:Destroy()
  422. end)
  423. chat()
  424. end
  425. function onChatted(msg)
  426. chatfunc(msg)
  427. end
  428. Player.Chatted:connect(onChatted)
  429. ---------------------------------------------------------------------------
  430. local plr = game:service'Players'.LocalPlayer
  431. local char = plr.Character
  432. local hum = char.Humanoid
  433. local hed = char.Head
  434. Character = char
  435. Torso = Character["Torso"]
  436. Head = Character["Head"]
  437. RightArm = Character["Right Arm"]
  438. LeftArm = Character["Left Arm"]
  439. RightLeg = Character["Right Leg"]
  440. LeftLeg = Character["Left Leg"]
  441. local BC = Character["Body Colors"]
  442. BC.HeadColor = BrickColor.new("-Light stone grey")
  443. BC.LeftArmColor = BrickColor.new("-Light stone grey")
  444. BC.LeftLegColor = BrickColor.new("-Light stone grey")
  445. BC.RightArmColor = BrickColor.new("-Light stone grey")
  446. BC.RightLegColor = BrickColor.new("-Light stone grey")
  447. BC.TorsoColor = BrickColor.new("-Light stone grey")
  448.  
  449. for i,v in pairs(Character:children()) do
  450. if v:IsA("Shirt") then
  451. v:Destroy()
  452. end
  453. end
  454. for i,v in pairs(Character:children()) do
  455. if v:IsA("Pants") then
  456. v:Destroy()
  457. end
  458. end
  459. for i,v in pairs(Character:children()) do
  460. if v:IsA("Accessory") then
  461. v:Destroy()
  462. end
  463. end
  464. shirt = Instance.new("Shirt", Character)--Cloths--
  465. shirt.Name = "Shirt"
  466. pants = Instance.new("Pants", Character)
  467. pants.Name = "Pants"
  468. Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=46810244"
  469. Character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=55631376"
  470.  
  471. hed.face.Texture = "http://www.roblox.com/asset/?id=8560915 "
  472.  
  473. ----------------------------------------------------
  474. function weld5(part0, part1, c0, c1)
  475. weeld=Instance.new("Weld", part0)
  476. weeld.Part0=part0
  477. weeld.Part1=part1
  478. weeld.C0=c0
  479. weeld.C1=c1
  480. return weeld
  481. end
  482. ----------------------------------------------------
  483. function newRay(start,face,range,wat)
  484. local rey=Ray.new(start.p,(face.p-start.p).Unit*range)
  485. hit,pos=Workspace:FindPartOnRayWithIgnoreList(rey,wat)
  486. return rey,hit,pos
  487. end
  488. ----------------------------------------------------
  489. mod5 = Instance.new("Model",char)
  490.  
  491. function FindNearestTorso(Position,Distance,SinglePlayer)
  492. if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
  493. local List = {}
  494. for i,v in pairs(workspace:GetChildren())do
  495. if v:IsA("Model")then
  496. if v:findFirstChild("Torso")then
  497. if v ~= char then
  498. if(v.Torso.Position -Position).magnitude <= Distance then
  499. table.insert(List,v)
  500. end
  501. end
  502. end
  503. end
  504. end
  505. return List
  506. end
  507.  
  508. function Landing()
  509. part=Instance.new('Part',mod5)
  510. part.Anchored=true
  511. part.CanCollide=false
  512. part.FormFactor='Custom'
  513. part.Size=Vector3.new(.2,.2,.2)
  514. part.CFrame=root.CFrame*CFrame.new(0,-2,0)
  515. part.Transparency=.7
  516. part.BrickColor=BrickColor.new('Really black')
  517. mesh=Instance.new('SpecialMesh',part)
  518. mesh.MeshId='http://www.roblox.com/asset/?id=20329976'
  519. mesh.Scale=Vector3.new(10,5,10)
  520.  
  521. for i,v in pairs(FindNearestTorso(torso.CFrame.p,40))do
  522. if v:FindFirstChild('Humanoid') then
  523. v.Humanoid:TakeDamage(math.random(20,30))
  524. v.Humanoid.PlatformStand = true
  525. v:FindFirstChild("Torso").Velocity = hed.CFrame.lookVector * 100
  526. end
  527. end
  528.  
  529. coroutine.resume(coroutine.create(function()
  530. for i=0,3.8,0.05 do
  531. wait()
  532. part.CFrame=part.CFrame
  533. part.Transparency=i
  534. mesh.Scale=mesh.Scale+Vector3.new(1,0.2,1)
  535. end
  536. part.Parent = nil
  537. end))
  538. end
  539. ----------------------------------------------------
  540. mod4 = Instance.new("Model",char)
  541.  
  542. ptez = {0.7, 0.8, 0.9, 1}
  543.  
  544. function FindNearestTorso(Position,Distance,SinglePlayer)
  545. if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
  546. local List = {}
  547. for i,v in pairs(workspace:GetChildren())do
  548. if v:IsA("Model")then
  549. if v:findFirstChild("Torso")then
  550. if v ~= char then
  551. if(v.Torso.Position -Position).magnitude <= Distance then
  552. table.insert(List,v)
  553. end
  554. end
  555. end
  556. end
  557. end
  558. return List
  559. end
  560.  
  561. ----------------------------------------------------
  562.  
  563. local acos = math.acos
  564. local sqrt = math.sqrt
  565. local Vec3 = Vector3.new
  566. local fromAxisAngle = CFrame.fromAxisAngle
  567.  
  568. local function toAxisAngle(CFr)
  569. local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components()
  570. local Angle = math.acos((R00+R11+R22-1)/2)
  571. local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  572. A = A == 0 and 0.00001 or A
  573. local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  574. B = B == 0 and 0.00001 or B
  575. local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  576. C = C == 0 and 0.00001 or C
  577. local x = (R21-R12)/sqrt(A)
  578. local y = (R02-R20)/sqrt(B)
  579. local z = (R10-R01)/sqrt(C)
  580. return Vec3(x,y,z),Angle
  581. end
  582.  
  583. function ApplyTrig(Num,Func)
  584. local Min,Max = Func(0),Func(1)
  585. local i = Func(Num)
  586. return (i-Min)/(Max-Min)
  587. --[[if Func == "sin" then
  588. return (math.sin((1-Num)*math.pi)+1)/2
  589. elseif Func == "cos" then
  590. return (math.cos((1-Num)*math.pi)+1)/2
  591. end]]
  592. end
  593.  
  594. function LerpCFrame(CFrame1,CFrame2,Num)
  595. local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2)
  596. return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num
  597. end
  598. mouse.KeyDown:connect(function(key)
  599. if key == "e" then
  600. if Debounces.CanAttack == true then
  601. Debounces.CanAttack = false
  602. Debounces.on = true
  603. Debounces.NoIdl = true
  604. for i = 1,20 do
  605. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,-3) * CFrame.Angles(1.3,0,0),.3)
  606. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
  607. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
  608. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
  609. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
  610. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
  611. if Debounces.on == false then break end
  612. wait()
  613. end
  614. local HitBox = Instance.new("Part",char)
  615. HitBox.Size = Vector3.new(5,5,5)
  616. HitBox.CanCollide = false
  617. HitBox.Transparency = math.huge
  618. local HitBox2 = Instance.new("Weld",HitBox)
  619. HitBox2.Part0 = rarm
  620. HitBox2.Part1 = HitBox
  621. HitBox2.C0 = CFrame.new(0,-4.5,0)
  622. HitBox.Touched:connect(function(hit)
  623. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= nil then
  624. if not DD then DD = true
  625. hit.Parent.Humanoid.PlatformStand = true
  626. local We = Instance.new("Weld",hit.Parent.Torso)
  627. We.Part0 = rarm
  628. We.Part1 = hit.Parent.Torso
  629. We.C0 = CFrame.new(0,-5,0)*CFrame.Angles(-1.55,0,0)
  630. wait(1)
  631. for i = 1,20 do
  632. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,4,0) * CFrame.Angles(3.1,0,1),.3)
  633. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,4,0) * CFrame.Angles(-3.1,0,-1),.3)
  634. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(1,0,0),.3)
  635. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
  636. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
  637. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
  638. if Debounces.on == false then break end
  639. wait()
  640. end
  641. hit.Parent.Humanoid:TakeDamage(20)
  642. for i = 1,20 do
  643. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(6,4,-1) * CFrame.Angles(1.55,0,-1),.3)
  644. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-6,4,-1) * CFrame.Angles(1.55,0,1),.3)
  645. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(-0.4,0,0),.3)
  646. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
  647. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
  648. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
  649. if Debounces.on == false then break end
  650. wait()
  651. end
  652. for i = 1,20 do
  653. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(5,4,-1) * CFrame.Angles(1.55,0,-1.3),.3)
  654. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-5,4,-1) * CFrame.Angles(1.55,0,1.3),.3)
  655. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(-0.4,0,0),.3)
  656. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
  657. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
  658. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
  659. if Debounces.on == false then break end
  660. wait()
  661. end
  662. local partasdeff = Instance.new("ParticleEmitter",hit.Parent.Torso)
  663. partasdeff.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(1, 0, 0))
  664. partasdeff.LightEmission = .1
  665. partasdeff.Size = NumberSequence.new(0.2)
  666. partasdeff.Texture = "http://www.roblox.com/asset/?ID=380529823"
  667. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)})
  668. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  669. partasdeff.Transparency = bbb
  670. partasdeff.Size = aaa
  671. partasdeff.ZOffset = .9
  672. partasdeff.Acceleration = Vector3.new(0, -5, 0)
  673. partasdeff.LockedToPart = false
  674. partasdeff.EmissionDirection = "Top"
  675. partasdeff.Lifetime = NumberRange.new(1, 2)
  676. partasdeff.Rate = 1000
  677. partasdeff.Rotation = NumberRange.new(-100, 100)
  678. partasdeff.RotSpeed = NumberRange.new(-100, 100)
  679. partasdeff.Speed = NumberRange.new(10)
  680. partasdeff.VelocitySpread = 300
  681. partasdeff.Enabled = true
  682. wait(1.5)
  683. hit.Parent:BreakJoints()
  684. We:remove()
  685. partasdeff.Enabled = false
  686. if Debounces.CanAttack == false then
  687. Debounces.CanAttack = true
  688. Debounces.on = false
  689. Debounces.NoIdl = false
  690. end
  691. wait(1313)
  692. DD = false
  693. end
  694. end
  695. end)
  696. ---ANIMATION REPLAY
  697. end
  698. end
  699. end)
  700. mouse.KeyDown:connect(function(key)
  701. if key == "r" then
  702. if Debounces.CanAttack == true then
  703. Debounces.CanAttack = false
  704. Debounces.on = true
  705. Debounces.NoIdl = true
  706. for i = 1,20 do
  707. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,0) * CFrame.Angles(0.5,0,0),.3)
  708. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
  709. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
  710. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(-0.5,0,0),.3)
  711. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, -2) *CFrame.Angles(0.5,0,0),.3)
  712. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6, 1.2) * CFrame.Angles(-1.5,0,0),.3)
  713. if Debounces.on == false then break end
  714. wait()
  715. end
  716. local HitBox = Instance.new("Part",char)
  717. HitBox.Size = Vector3.new(5,5,5)
  718. HitBox.CanCollide = false
  719. HitBox.Transparency = math.huge
  720. local HitBox2 = Instance.new("Weld",HitBox)
  721. HitBox2.Part0 = rleg
  722. HitBox2.Part1 = HitBox
  723. HitBox2.C0 = CFrame.new(0,-1.1,0)
  724. local SFXZ = Instance.new("Sound",torso)
  725. SFXZ.SoundId = "rbxassetid://169259383"
  726. SFXZ.Volume = math.huge
  727. SFXZ.Pitch = 0.5
  728. SFXZ.Looped = false
  729. wait(0.01)
  730. SFXZ:Play()
  731. HitBox.Touched:connect(function(hit)
  732. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= nil then
  733. local SFXZ = Instance.new("Sound",torso)
  734. SFXZ.SoundId = "rbxassetid://743886825"
  735. SFXZ.Volume = 1
  736. SFXZ.Pitch = 0.5
  737. SFXZ.Looped = false
  738. SFXZ:Play()
  739. HitBox:remove()
  740. hit.Parent.Humanoid:TakeDamage(44)
  741. hit.Parent.Humanoid.PlatformStand = true
  742. local Fl = Instance.new("BodyVelocity",hit.Parent.Torso)
  743. Fl.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  744. Fl.velocity = rleg.CFrame.lookVector*350
  745. wait(0.1)
  746. Fl:remove()
  747. end
  748. end)
  749. for i = 1,20 do
  750. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
  751. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(0.5,0,0),.3)
  752. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
  753. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0.5,0,0),.3)
  754. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, 2) *CFrame.Angles(-0.5,0,0),.3)
  755. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6, -1.2) * CFrame.Angles(1.5,0,0),.3)
  756. if Debounces.on == false then break end
  757. wait()
  758. end
  759. if Debounces.CanAttack == false then
  760. Debounces.CanAttack = true
  761. Debounces.on = false
  762. Debounces.NoIdl = false
  763. HitBox:remove()
  764. end
  765. end
  766. end
  767. end)
  768. ----------------------------------------------------
  769. mouse.KeyDown:connect(function(key)
  770. if string.byte(key) == 48 then
  771. char.Humanoid.WalkSpeed = 34
  772. end
  773. end)
  774. mouse.KeyUp:connect(function(key)
  775. if string.byte(key) == 48 then
  776. char.Humanoid.WalkSpeed = 5
  777. end
  778. end)
  779. ----------------------------------------------------
  780. local animpose = "Idle"
  781. local lastanimpose = "Idle"
  782. local sine = 0
  783. local change = 1
  784. local val = 0
  785. local ffing = false
  786. ----------------------------------------------------
  787. local x = Instance.new("Sound", char.Torso)
  788. x.SoundId = "http://www.roblox.com/asset/?id=273962540"
  789. x.Looped = true
  790. x.Volume = 1
  791. x.Pitch = 1
  792. local footsteps = false
  793. -------------------------------
  794. game:GetService("RunService").RenderStepped:connect(function()
  795. rarm.BrickColor = ASD
  796. larm.BrickColor = ASD
  797. rleg.BrickColor = ASD
  798. lleg.BrickColor = ASD
  799. hed.BrickColor = ASD
  800. torso.BrickColor = ASD
  801. --[[if char.Humanoid.Jump == true then
  802. jump = true
  803. else
  804. jump = false
  805. end]]
  806. char.Humanoid.FreeFalling:connect(function(f)
  807. if f then
  808. ffing = true
  809. else
  810. ffing = false
  811. end
  812. end)
  813. sine = sine + change
  814. if jumpn == true then
  815. animpose = "Jumping"
  816. elseif ffing == true then
  817. animpose = "Freefalling"
  818. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
  819. animpose = "Idle"
  820. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
  821. animpose = "Walking"
  822. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then
  823. animpose = "Running"
  824. end
  825. if animpose ~= lastanimpose then
  826. sine = 0
  827. if Debounces.NoIdl == false then
  828. if animpose == "Idle" then
  829. for i = 1, 2 do
  830. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(8,.9,0)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(20)), 0.2)
  831. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-8,.9,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-20)), 0.2)
  832. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,-.2)*CFrame.Angles(math.rad(-14),math.rad(0),0), 0.2)
  833. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0, math.rad(0), 0), 0.2)
  834. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-3, -8.8, 0) * CFrame.Angles(0, 0, math.rad(-10)), 0.2)
  835. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(3, -8.8, 0) * CFrame.Angles(0, 0, math.rad(10)), 0.2)
  836. end
  837. elseif animpose == "Walking" then
  838. for i = 1, 2 do
  839. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.3, .9, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(20)), 0.2)
  840. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.3, .9, 0)*CFrame.Angles(0, math.rad(1), math.rad(-10)), 0.2)
  841. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(-8), math.rad(0), math.rad(0)),0.2)
  842. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(math.rad(-4), 0, math.rad(0)), 0.2)
  843. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, -.05) * CFrame.Angles(math.rad(-18), 0, 0), .4)
  844. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8, -.05) * CFrame.Angles(math.rad(-18), 0, 0), .4)
  845. end
  846. elseif animpose == "Running" then
  847. for i = 1, 2 do
  848. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.8, 0.9, .5) * CFrame.Angles(math.rad(-10), math.rad(-40), math.rad(50)), 0.2)
  849. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.8, 1.2, 0-1*math.cos(sine/4)/2)*CFrame.Angles(math.rad(50-80*math.cos(sine/8)/2), math.rad(0), math.rad(0-70*math.cos(sine/8)/2)), 0.2)
  850. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(6+8*math.cos(sine/4)/1.8), math.rad(0), math.rad(0)),0.2)
  851. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2+0.2*math.cos(sine/4)/2, 0) * CFrame.Angles(math.rad(-14+4*math.cos(sine/4)/2), 0, math.rad(0)), 0.2)
  852. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.44*math.cos(sine/8)/2.4, -.15 + math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + -math.sin(sine/8)/1.7, 0, 0), .4)
  853. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.44*math.cos(sine/8)/2.4, -.15 + -math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + math.sin(sine/8)/1.7, 0, 0), .4)
  854. end
  855. wait()
  856. end
  857. else
  858. end
  859. end
  860. lastanimpose = animpose
  861. if Debounces.NoIdl == false then
  862. if animpose == "Idle" then
  863. if stanceToggle == "Normal" then
  864. change = 0.5
  865. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(8,1,0)*CFrame.Angles(0,0,0-.1*math.sin(tick()*1))*CFrame.Angles(0,0,0.3),.2)
  866. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-8,1,0)*CFrame.Angles(0,0,0+.1*math.sin(tick()*1))*CFrame.Angles(0,0,-0.3),.2)
  867. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,-.2)*CFrame.Angles(math.rad(-14+1*math.cos(sine/14)),math.rad(40),0), 0.2)
  868. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0, math.rad(-40), 0), 0.2)
  869. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-3, -8.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.2)
  870. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(3, -8.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.2)
  871. elseif stanceToggle == "Sitting" then
  872. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(3, .9, 0) * CFrame.Angles(math.rad(100-1*math.cos(sine/14)), math.rad(0), math.rad(20)), 0.2)
  873. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-2, .9, -1)*CFrame.Angles(math.rad(78+1*math.cos(sine/14)), math.rad(0), math.rad(50)), 0.2)
  874. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 3, -.3) * CFrame.Angles(math.rad(-14+1*math.cos(sine/14)), math.rad(0), math.rad(0)),0.2)
  875. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -3, 0) * CFrame.Angles(math.rad(-10+1*math.cos(sine/14)), 0, math.rad(0)), 0.2)
  876. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-1, -1, -2) * CFrame.Angles(math.rad(-10-1*math.cos(sine/14)), 0, 0), 0.2)
  877. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(1, -3, .6) * CFrame.Angles(math.rad(-50-1*math.cos(sine/14)), 0, 0), 0.2)
  878. end
  879. elseif animpose == "Walking" then
  880. if stanceToggle == "Normal" then
  881. change = 1
  882. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.3,0.8,0)*CFrame.Angles(0-.5*math.sin(tick()*2/0.7),0,0),.3)
  883. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.3,0.8,0)*CFrame.Angles(0+.5*math.sin(tick()*2/0.7),0,0),.3)
  884. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(-0.2,0,0),.3)
  885. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0,-2.2,0)*CFrame.new(0,0-.1*math.sin(tick()*2),0)*CFrame.Angles(0,0,0),.3)
  886. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.3*math.cos(sine/16)/4, -.05 + math.sin(sine/16)/2) * CFrame.Angles(math.rad(-18) + -math.sin(sine/16)/2.3, 0, 0), .4)
  887. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.3*math.cos(sine/16)/4, -.05 + -math.sin(sine/16)/2) * CFrame.Angles(math.rad(-18) + math.sin(sine/16)/2.3, 0, 0), .4)
  888. end
  889. elseif animpose == "Running" then
  890. change = 1
  891. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.8,0.5,0)*CFrame.Angles(0-.5*math.sin(tick()*7),0,0),.3)
  892. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.8,0.5,0)*CFrame.Angles(0+.5*math.sin(tick()*7),0,0),.3)
  893. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(6+6*math.cos(sine/4)/1.8), math.rad(0), math.rad(0)),0.2)
  894. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2+0.2*math.cos(sine/4)/2, 0) * CFrame.Angles(math.rad(-14+10*math.cos(sine/4)/2), 0, math.rad(0)), 0.2)
  895. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.44*math.cos(sine/8)/2.4, -.15 + math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + -math.sin(sine/8)/1.7, 0, 0), .4)
  896. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.44*math.cos(sine/8 )/2.4, -.15 + -math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + math.sin(sine/8)/1.7, 0, 0), .4)
  897. end
  898. end
  899. if animpose == "Walking" then
  900. if footsteps == false then
  901. x:Play()
  902. footsteps = true
  903. end
  904. x.Pitch = 1.1
  905. elseif animpose == "Idle" then
  906. x:Stop()
  907. footsteps = false
  908. elseif animpose == "Running" then
  909. x.Pitch = 1.2
  910. if footsteps == false then
  911. x:Play()
  912. footsteps = true
  913. end
  914. end
  915. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement