Advertisement
Notepad95

ROBLOX Brock

Nov 13th, 2016
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 42.90 KB | None | 0 0
  1. v3 = Vector3.new
  2. cn = CFrame.new
  3. ca2 = CFrame.Angles
  4. mf = math.floor
  5. mran = math.random
  6. mrad = math.rad
  7. mdeg = math.deg
  8. ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
  9. mran2 = function(a,b) return mran(a*1000,b*1000)/1000 end
  10. ud=UDim2.new
  11. bn = BrickColor.new
  12. c3 = Color3.new
  13. Players=game:service'Players'
  14. Player=Players.LocalPlayer
  15. PChar=Player.Character
  16.  
  17. as,so={},{'metal','Block','Slash','Slash2','Hit','Kick'}
  18. as.corner='11294911'
  19. as.cone='1033714'
  20. as.ring="3270017"
  21. as.Chakram='47260990'
  22. as.ring2='18430887'
  23. as.blast='20329976'
  24. as.missile='10207677'
  25. as.fire='2693346'
  26. as.boom='3264793'
  27. as.slash='10209645'
  28. as.abscond='2767090'
  29. as.firelaser='13775494'
  30. as.diamond='9756362'
  31. as.metal='rbxasset://sounds\\unsheath.wav'
  32. as.Block = 'rbxasset://sounds\\metal.ogg'
  33. as.Slash = '10209645'
  34. as.Slash2 = '46760716'
  35. as.Hit='10209583'
  36. as.Kick='46153268'
  37. as.cast='2101137'
  38. as.rockhead= '21629626'
  39. as.rockheadt='21629620'
  40.  
  41.  
  42. for i,v in pairs(as) do
  43. if type(tonumber(v:sub(1,3)))=="number" then
  44. as[i]="http://www.roblox.com/asset/?id="..v
  45. end
  46. end
  47.  
  48. LastMade=nil
  49. iNew=function(tab)
  50. local v=Instance.new(tab[1])
  51. for Ind,Val in pairs(tab) do
  52. if Ind~=1 and Ind~=2 then
  53. v[Ind] = Val
  54. end
  55. end
  56. v.Parent=tab[2]==0 and LastMade or tab[2]
  57. LastMade=v
  58. return v
  59. end
  60. iPart=function(tab)
  61. local v=Instance.new(tab.type or 'Part')
  62. if tab.type~='CornerWedgePart' then v.formFactor='Custom' end
  63. v.TopSurface=0 v.BottomSurface=0
  64. if tab.sc then
  65. v.Size=v3(tab[2]*tab.sc,tab[3]*tab.sc,tab[4]*tab.sc)
  66. else
  67. v.Size=v3(tab[2],tab[3],tab[4])
  68. end
  69. if tab.co then v.BrickColor=bn(tab.co) end
  70. if tab.tr then v.Transparency=tab.tr end
  71. if tab.rf then v.Reflectance=tab.rf end
  72. if tab.can then v.CanCollide=tab.can end
  73. if tab.cf then v.CFrame=tab.cf end
  74. if tab.an then v.Anchored=tab.an end
  75. if tab.na then v.Name=tab.na end
  76. if tab.ma then v.Material=tab.ma end
  77. v.Parent=tab[1]
  78. v:BreakJoints()
  79. LastMade=v
  80. return v
  81. end
  82. function getoutline(x,z,i)
  83. return math.sqrt(x^2+z^2)+(i or 0.05),mdeg(math.atan2(x,z))
  84. end
  85. function v32(cf)
  86. local x,y,z=cf:toEulerAnglesXYZ()
  87. return v3(mdeg(x),mdeg(y),mdeg(z))
  88. end
  89. WeldLib={}
  90. function GetWeld(weld,CO)
  91. if not WeldLib[weld] then
  92. local x0,y0,z0=weld.C0:toEulerAnglesXYZ()
  93. local x1,y1,z1=weld.C1:toEulerAnglesXYZ()
  94. WeldLib[weld]={[0]=v3(mdeg(x0),mdeg(y0),mdeg(z0)),[1]=v3(mdeg(x1),mdeg(y1),mdeg(z1))}
  95. end
  96. return weld['C'..CO].p,WeldLib[weld][CO]
  97. end
  98. function ClearWeld(weld)
  99. if WeldLib[weld] then WeldLib[weld]=nil end
  100. end
  101. function TweenNum(i,loops,i1,i2,smooth)
  102. smooth = smooth or 1
  103. local perc
  104. if smooth == 1 then perc = math.sin((math.pi/2)/loops*i) else perc = i/loops end
  105. local ton
  106. if i1 > i2 then
  107. ton = -math.abs(i1 - i2) *perc
  108. else
  109. ton = math.abs(i1 - i2) *perc
  110. end
  111. return i1+ton
  112. end
  113. function TweenV3(i,loops,v1,v2,smooth)
  114. smooth = smooth or 1
  115. local perc
  116. if smooth == 1 then perc = math.sin((math.pi/2)/loops*i) else perc = i/loops end
  117. local tox2,toy2,toz2 = 0,0,0
  118. if v1.x > v2.x then
  119. tox2 = -math.abs(v1.x - v2.x) *perc
  120. else
  121. tox2 = math.abs(v1.x - v2.x) *perc
  122. end
  123. if v1.y > v2.y then
  124. toy2 = -math.abs(v1.y - v2.y) *perc
  125. else
  126. toy2 = math.abs(v1.y - v2.y) *perc
  127. end
  128. if v1.z > v2.z then
  129. toz2 = -math.abs(v1.z - v2.z) *perc
  130. else
  131. toz2 = math.abs(v1.z - v2.z) *perc
  132. end
  133. return v3(v1.x + tox2,v1.y + toy2,v1.z + toz2)
  134. end
  135. function TweenCF(i,loops,origpos,origangle,nextpos,nextangle,smooth)
  136. smooth = smooth or 1
  137. local perc
  138. if smooth == 1 then perc = math.sin((math.pi/2)/loops*i) else perc = i/loops end
  139. local tox,toy,toz = 0,0,0
  140. if origangle.x > nextangle.x then tox = -math.abs(origangle.x - nextangle.x) *perc
  141. else tox = math.abs(origangle.x - nextangle.x) *perc end
  142. if origangle.y > nextangle.y then toy = -math.abs(origangle.y - nextangle.y) *perc
  143. else toy = math.abs(origangle.y - nextangle.y) *perc end
  144. if origangle.z > nextangle.z then toz = -math.abs(origangle.z - nextangle.z) *perc
  145. else toz = math.abs(origangle.z - nextangle.z) *perc end
  146. local tox2,toy2,toz2 = 0,0,0
  147. if origpos.x > nextpos.x then
  148. tox2 = -math.abs(origpos.x - nextpos.x) *perc
  149. else tox2 = math.abs(origpos.x - nextpos.x) *perc end
  150. if origpos.y > nextpos.y then
  151. toy2 = -math.abs(origpos.y - nextpos.y) *perc
  152. else toy2 = math.abs(origpos.y - nextpos.y) *perc end
  153. if origpos.z > nextpos.z then
  154. toz2 = -math.abs(origpos.z - nextpos.z) *perc
  155. else toz2 = math.abs(origpos.z - nextpos.z) *perc end
  156. return cn(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*ca(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  157. end
  158. function SetWeld(weld,CO,i, loops, origpos,origangle, nextpos,nextangle,smooth)
  159. loops=math.floor(loops)
  160. smooth = smooth or 1
  161. if not WeldLib[weld] then
  162. local x0,y0,z0=weld.C0:toEulerAnglesXYZ()
  163. local x1,y1,z1=weld.C1:toEulerAnglesXYZ()
  164. WeldLib[weld]={[0]=v3(mdeg(x0),mdeg(y0),mdeg(z0)),[1]=v3(mdeg(x1),mdeg(y1),mdeg(z1))}
  165. end
  166. local perc =smooth==1 and math.sin((math.pi/2)/loops*i) or i/loops
  167. --print(weld.Part1)
  168. local tox,toy,toz = 0,0,0
  169. tox = origangle.x > nextangle.x and -math.abs(origangle.x - nextangle.x) *perc or math.abs(origangle.x - nextangle.x) *perc
  170. toy = origangle.y > nextangle.y and -math.abs(origangle.y - nextangle.y) *perc or math.abs(origangle.y - nextangle.y) *perc
  171. toz = origangle.z > nextangle.z and -math.abs(origangle.z - nextangle.z) *perc or math.abs(origangle.z - nextangle.z) *perc
  172. local tox2,toy2,toz2 = 0,0,0
  173. tox2= origpos.x > nextpos.x and -math.abs(origpos.x - nextpos.x) *perc or math.abs(origpos.x - nextpos.x) *perc
  174. toy2= origpos.y > nextpos.y and -math.abs(origpos.y - nextpos.y) *perc or math.abs(origpos.y - nextpos.y) *perc
  175. toz2= origpos.z > nextpos.z and -math.abs(origpos.z - nextpos.z) *perc or math.abs(origpos.z - nextpos.z) *perc
  176. WeldLib[weld][CO] = v3(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  177. weld['C'..CO] = cn(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*ca(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  178. end
  179. function se(Key,Text)
  180. local Values = {}
  181. for value in (Text..Key):gmatch("(.-)"..Key) do
  182. table.insert(Values,value)
  183. end
  184. local Values2={}
  185. for i,v in pairs(Values) do Values2[i]=Values[i]:lower() end
  186. return Values,Values2
  187. end
  188. findplayer=function(nn)
  189. if not nn then return nil end
  190. local found
  191. for i,v in pairs(Players:GetPlayers()) do
  192. if string.find(v.Name:lower(),nn:lower()) and not found then found=v end
  193. end
  194. return found
  195. end
  196. LoopFunctions={}
  197. iLoopFunctions=-9000
  198. function DoLoop(times,func)
  199. iLoopFunctions=iLoopFunctions+1
  200. LoopFunctions[tonumber(iLoopFunctions)]={times,0,func}
  201. end
  202. function MeshEffect(times,cf1,cf2,scale1,scale2,tr1,tr2,col,type)
  203. local cf2=cf2 or cf1
  204. local v=iPart{Char,0.2,0.2,0.2,co=col,cf=cf1,na='Mesh',an=true,ca=false,tr=tr1}
  205. local mesh=iNew{'SpecialMesh',v,Scale=scale1}
  206. if type=='Brick' or type=='Sphere' then
  207. mesh.MeshType=type
  208. else
  209. mesh.MeshId=type
  210. end
  211. local x1,y1,z1 = cf1:toEulerAnglesXYZ()
  212. local x2,y2,z2 = cf2:toEulerAnglesXYZ()
  213. local count=0
  214. DoLoop(times,function(i) count=count+1
  215. mesh.Scale=TweenV3(count,times,scale1,scale2,1)*((type=='Brick' or type=='Sphere') and 5 or 1)
  216. v.Transparency=TweenNum(count,times,tr1,tr2,1)
  217. v.CFrame=TweenCF(count,times,cf1.p,v3(mdeg(x1),mdeg(y1),mdeg(z1)),cf2.p,v3(mdeg(x2),mdeg(y2),mdeg(z2)),1)
  218. if i==1 then v:Remove() end end)
  219. end
  220. Dmgv={8,16}
  221. HitDebounce={}
  222. Damage=function(Hum,Mult,Sound)
  223. if not Hum or Hum.Parent==Char then return end
  224. if not Hum.Parent:findFirstChild'Torso' then return end
  225. local HName=Hum.Parent.Name
  226. if HitDebounce[HName] and HitDebounce[HName]>tick() then return end
  227. HitDebounce[HName]=tick()+0.2
  228. local Mult=Mult or 1
  229. local Dealt=mran(Dmgv[1],Dmgv[2])*Mult
  230. local col=''
  231. if Hum.Parent:findFirstChild'Block' and Hum.Parent.Block.Value>0 then
  232. Hum.Parent.Block.Value=Hum.Parent.Block.Value-1
  233. col='Bright blue'
  234. else
  235. Hum.Health=Hum.Health-Dealt
  236. col='Bright red'
  237. end
  238. if Sound then so[col=='Bright blue' and 'Block' or 'Hit']:Play() end
  239. local DoH=iNew{'Model',Char,Name=col=='Bright blue' and 'Block' or Dealt}
  240. iNew{'Humanoid',DoH,MaxHealth=1/0,Health=1/0,Name=''}
  241. local Doh=iPart{DoH,0.6,0.2,0.6,co=col,an=true} Doh.Name='Head' iNew{'CylinderMesh',Doh}
  242. local dofs=Hum.Parent.Torso.CFrame*cn(mran2(-1.5,1.5),2.5,mran2(-1,1)) Doh.CFrame=dofs
  243. DoLoop(40,function(i) Doh.CFrame=dofs*cn(0,i*2,0) Doh.Transparency=i-0.5 if i==1 then DoH:Remove() end end)
  244. end
  245. AOEFind = function(pos,ra,f,f2) -- range get
  246. local p0,p1=pos-v3(ra/2,ra/2,ra/2),pos+v3(ra/2,ra/2,ra/2)
  247. pcall(function()
  248. for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),nil,100)) do
  249. local Hum=v.Parent:findFirstChild'Humanoid'
  250. if v.Name=='Torso' and Hum and Hum.Health>0 and v.Parent~=Char then
  251. pcall(function() f(Hum,v) end)
  252. elseif f2 and not Hum then
  253. pcall(function() f2(v) end)
  254. end
  255. end
  256. end)
  257. end
  258. function FindSurface(part, position)
  259. local obj = part.CFrame:pointToObjectSpace(position)
  260. local siz = part.Size/2
  261. for i,v in pairs(Enum.NormalId:GetEnumItems()) do
  262. local vec = Vector3.FromNormalId(v)
  263. local wvec = part.CFrame:vectorToWorldSpace(vec)
  264. local vz = (obj)/(siz*vec)
  265. if (math.abs(vz.X-1) < 0.01 or math.abs(vz.Y-1) < 0.01 or math.abs(vz.Z-1) < 0.01) then
  266. return wvec,vec
  267. end
  268. end
  269. if part.className == "WedgePart" then
  270. return part.CFrame:vectorToWorldSpace(Vector3.new(0,0.707,-0.707)), Vector3.new(0,0.707,-0.707)
  271. end
  272. end
  273. function FaceBG(pos)
  274. BG.maxTorque=v3(1,1,1)/0
  275. BG.cframe=cn(Torso.Position,v3(pos.x,Torso.Position.y,pos.z))*cn(0,0,-1)
  276. end
  277. ray = function(Pos, Dir,tab,length) -- ray cast
  278. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *(length or 999)),tab)
  279. end
  280. function Projectile(ofs,speed,part,adj,fhit,fnohit)
  281. part.CFrame=ofs*adj
  282. local stop=false
  283. DoLoop(50,function(x)
  284. local i=x
  285. if not stop then
  286. local hit,pos=ray(ofs.p,ofs.p-ofs*cn(0,0,-1).p,Char,speed+1)
  287. if hit then
  288. --Hit
  289. if fhit then i=1 stop=true
  290. ----
  291. local cof=FindSurface(hit,pos)
  292. --iPart{workspace,2,2,0.2,cf=cn(pos,pos+cof),an=true,co='Black'}
  293. ----
  294. local x,y,z=ofs:toEulerAnglesXYZ()
  295. ofs=cn(pos)*ca(mdeg(x),mdeg(y),mdeg(z))*cn(0,0,-part.Size.y/2)
  296. part.CFrame=ofs*adj
  297. fhit(hit,pos) end
  298. else
  299. ofs=ofs*cn(0,0,speed)
  300. part.CFrame=ofs*adj
  301. end
  302. if i==1 then
  303. if fnohit then fnohit(ofs.p) else part:Remove() end
  304. end
  305. end
  306. end)
  307. end
  308.  
  309. CC={'','Bright yellow','Flame reddish orange'}
  310. Scale=5
  311. Mat='Marble'
  312.  
  313. SpawnPoint=PChar.Torso.CFrame*cn(0,1+Scale*3,-20-Scale*1.5)
  314. name='Brock'
  315. pcall(function() _G.OldMod00:Remove() end)
  316.  
  317. ---------------
  318. UNDYING=function()
  319. pcall(function() fUNDYING:disconnect() end)
  320. pcall(function() local hum=Grabbing.Part1.Parent.Humanoid Grabbing:Remove() Grabbing=nil hum.PlatformStand=false end)
  321. Torso.Anchored=true Torso.Transparency=1 Torso.CanCollide=false
  322. Stand:Remove() Head:Remove()
  323. local RespawnPos=cn(Torso.CFrame.p+v3(0,Scale*5,0))*ca(0,mran(-360,360),0)
  324. wait(4)
  325. Anim='Reviving'
  326. local oldChar=Char
  327. local oldRootLimbs=RootLimbs
  328. for i,v in pairs(oldRootLimbs) do v.Anchored=true end
  329. fMarble(Char,function(v) v.Anchored=true end)
  330. MakeAI(RespawnPos) Anim='Reviving'
  331. fMarble(Char,function(v) v.Transparency=1 end)
  332. for i,v in pairs(RootLimbs) do v.Transparency=1 end
  333. wait(0.1) Torso.Anchored=true
  334. local Reconstruct={}
  335. fMarble(oldChar,function(v)
  336. local x1,y1,z1=v.CFrame:toEulerAnglesXYZ()
  337. local x2,y2,z2=Char[v.Parent.Name][v.Name].CFrame:toEulerAnglesXYZ()
  338. Reconstruct[#Reconstruct+1]={v,Char[v.Parent.Name][v.Name],v.Position,v3(mdeg(x1),mdeg(y1),mdeg(z1)),v3(mdeg(x2),mdeg(y2),mdeg(z2))} end)
  339. for i,v in pairs(oldRootLimbs) do
  340. local x1,y1,z1=v.CFrame:toEulerAnglesXYZ()
  341. local x2,y2,z2=Char[v.Name].CFrame:toEulerAnglesXYZ()
  342. Reconstruct[#Reconstruct+1]={v,Char[v.Name],v.Position,v3(mdeg(x1),mdeg(y1),mdeg(z1)),v3(mdeg(x2),mdeg(y2),mdeg(z2))} end
  343. local tweens=100
  344. for tween=1,tweens do
  345. for i,v in pairs(Reconstruct) do v[1].CFrame=TweenCF(tween,tweens,v[3],v[4],v[2].Position,v[5],1)*ca(360*(tween/tweens),720*(tween/tweens),0) end
  346. wait()
  347. end
  348. oldChar:Remove()
  349. fMarble(Char,function(v) v.Transparency=0 end)
  350. for i,v in pairs(RootLimbs) do v.Transparency=0 end
  351. Torso.Anchored=false wait()
  352. BG.maxTorque=v3(1,1,1)/0 BG.cframe=Torso.CFrame
  353. ReturnAnim()
  354. wait(2)
  355. BG.maxTorque=nov3
  356. Anim,ArmAnim,LegAnim='None','None','None'
  357. end
  358. ------
  359.  
  360. function MakeAI(SpawnPoint2)
  361. Char=iNew{'Model',workspace,Name=name,archivable=false} _G.OldMod00=Char
  362. Torso=iPart{Char,2,2,1,sc=Scale,co=CC[1],cf=SpawnPoint2,na='Torso'}
  363. pTorso=iPart{Char,2,2,1,sc=Scale,co=CC[1],cf=SpawnPoint2,na='pTorso'}
  364. Head=iPart{Char,1,1,1,sc=Scale,co=CC[1],na='Head'}
  365. pHead=iPart{Char,1,1,1,sc=Scale,co=CC[1],na='pHead'} iNew{'SpecialMesh',pHead,Scale=v3(1,1,1)*Scale/1.4,VertexColor=v3(1,1,1)/1.65,MeshId=as.rockhead,TextureId=as.rockheadt}
  366. Stand=iPart{Char,1.5,2.9,1.1,sc=Scale,co=CC[1],na='Stand'}
  367.  
  368. for i,n in pairs(so) do
  369. local v=iNew{'Sound',Torso,Volume=1,Pitch=1,Looped=false,Name=v,SoundId=as[n]}
  370. so[n]=v
  371. end
  372.  
  373.  
  374. LSho=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='LSho'}
  375. LArm=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='LArm'}
  376.  
  377. RSho=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='RSho'}
  378. RArm=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='RArm'}
  379.  
  380. LThi=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='LThi'}
  381. LLeg=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='LLeg'}
  382.  
  383. RThi=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='RThi'}
  384. RLeg=iPart{Char,1,1.5,1,sc=Scale,co=CC[1],na='RLeg'}
  385.  
  386.  
  387.  
  388. nov3=v3(0,0,0)
  389. Marble={}
  390. MarbleSpeed=0.2
  391. MarbleMax=12
  392. for i,v in pairs({pTorso,LSho,RSho,LArm,RArm,LThi,RThi,LLeg,RLeg}) do
  393. v.Material=Mat
  394. local VS=v.Size
  395. local va=1.2
  396. --v.Size=v.Size/1.5
  397. local vv=v:Clone()
  398. for x=-1,1,2 do
  399. for y=-1,1,2 do
  400. for z=-1,1,2 do
  401. local marb=vv:Clone() marb.Size=VS/mran2(1.8,2.2) marb.Parent=v marb.Name=x..y..z
  402. local wmarb=iNew{'Weld',marb,Part0=v,Part1=marb,C0=cn(VS.x/4*x/va,VS.y/4*y,VS.z/4*z/va)*ca(mran(-MarbleMax,MarbleMax),mran(-MarbleMax,MarbleMax),mran(-MarbleMax,MarbleMax))}
  403. Marble[#Marble+1]={wmarb,mran(-1,1),mran(-1,1),mran(-1,1)}
  404. end end end
  405. iNew{'BlockMesh',v,Scale=v3(1,1,1)/1.5}
  406. v.Transparency=0 --.995
  407. end
  408.  
  409. for i,v in pairs(Char:children()) do if v:IsA'BasePart' and v.Name~='Torso' then v.CFrame=Torso.CFrame end end
  410.  
  411. Head.Transparency=0.99
  412. Head.CanCollide=false
  413. Neck=iNew{'Weld',Torso,Part0=Torso,Part1=Head,C0=cn(0,0,0)}
  414. pNeck=iNew{'Weld',Torso,Part0=pTorso,Part1=pHead,C0=cn(0,1.5*Scale,0)}
  415. Hum=iNew{'Humanoid',Char}
  416.  
  417.  
  418. Torso.Transparency=1
  419. wTorso=iNew{'Weld',Torso,Part0=Torso,Part1=pTorso,C0=cn(0,-2.5*Scale,0)*ca(0,0,0)}
  420. oTorso=cn(0,0,0)
  421.  
  422. Stand.Transparency=1
  423. wStand=iNew{'Weld',Torso,Part0=Torso,Part1=Stand,C0=cn(0,-2.5*Scale,0)}
  424.  
  425. wLSho=iNew{'Weld',LSho,Part0=pTorso,Part1=LSho,C0=cn(-1.5*Scale,0.75*Scale,0),C1=cn(0,0.25*Scale,0)}
  426. wLArm=iNew{'Weld',LArm,Part0=LSho,Part1=LArm,C0=cn(0,-0.75*Scale,0),C1=cn(0,0.75*Scale,0)}
  427.  
  428. wRSho=iNew{'Weld',RSho,Part0=pTorso,Part1=RSho,C0=cn(1.5*Scale,0.75*Scale,0),C1=cn(0,0.25*Scale,0)}
  429. wRArm=iNew{'Weld',RArm,Part0=RSho,Part1=RArm,C0=cn(0,-0.75*Scale,0),C1=cn(0,0.75*Scale,0)}
  430.  
  431. wLThi=iNew{'Weld',LThi,Part0=pTorso,Part1=LThi,C0=cn(-0.5*Scale,-1*Scale,0),C1=cn(0,0.75*Scale,0)}
  432. wLLeg=iNew{'Weld',LLeg,Part0=LThi,Part1=LLeg,C0=cn(1,-0.75*Scale,0),C1=cn(0,0.75*Scale,0)}
  433.  
  434. wRThi=iNew{'Weld',RThi,Part0=pTorso,Part1=RThi,C0=cn(0.5*Scale,-1*Scale,0),C1=cn(0,0.75*Scale,0)}
  435. wRLeg=iNew{'Weld',RLeg,Part0=RThi,Part1=RLeg,C0=cn(0,-0.75*Scale,0),C1=cn(0,0.75*Scale,0)}
  436.  
  437. wLSho.C0=cn(-1.5*Scale,0.75*Scale,0)*ca(0,0,-135) --a,b
  438. wLArm.C0=cn(0,-0.75*Scale,0)*ca(0,0,0) --c,d
  439. wRSho.C0=cn(1.5*Scale,0.75*Scale,0)*ca(0,0,135) --e,f
  440. wRArm.C0=cn(0,-0.75*Scale,0)*ca(0,0,0) --g,h
  441. ----
  442. wLThi.C0=cn(-0.5*Scale,-1*Scale,0)*ca(0,0,-45) --i,j
  443. wLLeg.C0=cn(0,-0.75*Scale,0)*ca(0,0,0) --k,l
  444. wRThi.C0=cn(0.5*Scale,-1*Scale,0)*ca(0,0,45) --m,n
  445. wRLeg.C0=cn(0,-0.75*Scale,0)*ca(0,0,0) --o,p
  446.  
  447. BG=iNew{'BodyGyro',Torso,maxTorque=nov3}
  448. BP=iNew{'BodyPosition',Torso,maxForce=nov3}
  449. fUNDYING=Hum.Died:connect(UNDYING)
  450. LimbNames={'LSho','RSho','LArm','RArm','RThi','LThi','RLeg','LLeg'}
  451. for i=1,8 do local v=LimbNames[i] LimbNames[v]=getfenv()["w"..v] end
  452. RootLimbs={pHead,pTorso,LSho,RSho,LArm,RArm,RThi,LThi,RLeg,LLeg}
  453. Anim,LegAnim,ArmAnim='Sit','Sit','Sit'
  454. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=GetPose()
  455. SetWeld(wLSho,0,1,1,a,b,v3(-1.5*Scale,0.5*Scale,0),v3(0,0,-10),1)
  456. SetWeld(wLArm,0,1,1,c,d,v3(0,-0.75*Scale,0),v3(10,0,10),1)
  457. SetWeld(wRSho,0,1,1,e,f,v3(1.5*Scale,0.5*Scale,0),v3(0,0,10),1)
  458. SetWeld(wRArm,0,1,1,g,h,v3(0,-0.75*Scale,0),v3(10,0,-10),1)
  459. SetWeld(wLThi,0,1,1,i,j,v3(-0.5*Scale,-1*Scale,0),v3(15,0,-5),1)
  460. SetWeld(wLLeg,0,1,1,k,l,v3(0,-0.75*Scale,0),v3(-15,0,5),1)
  461. SetWeld(wRThi,0,1,1,m,n,v3(0.5*Scale,-1*Scale,0),v3(15,0,5),1)
  462. SetWeld(wRLeg,0,1,1,o,p,v3(0,-0.75*Scale,0),v3(-15,0,-5),1)
  463. Oa,Ob,Oc,Od,Oe,Of,Og,Oh,Oi,Oj,Ok,Ol,Om,On,Oo,Op=GetPose()
  464. SetWeld(wLSho,0,1,1,nov3,nov3,a,b,1)
  465. SetWeld(wLArm,0,1,1,nov3,nov3,c,d,1)
  466. SetWeld(wRSho,0,1,1,nov3,nov3,e,f,1)
  467. SetWeld(wRArm,0,1,1,nov3,nov3,g,h,1)
  468. SetWeld(wLThi,0,1,1,nov3,nov3,i,j,1)
  469. SetWeld(wLLeg,0,1,1,nov3,nov3,k,l,1)
  470. SetWeld(wRThi,0,1,1,nov3,nov3,m,n,1)
  471. SetWeld(wRLeg,0,1,1,nov3,nov3,o,p,1)
  472. end
  473.  
  474. function GetPose()
  475. local a,b=GetWeld(wLSho,0)
  476. local c,d=GetWeld(wLArm,0)
  477. local e,f=GetWeld(wRSho,0)
  478. local g,h=GetWeld(wRArm,0)
  479. local i,j=GetWeld(wLThi,0)
  480. local k,l=GetWeld(wLLeg,0)
  481. local m,n=GetWeld(wRThi,0)
  482. local o,p=GetWeld(wRLeg,0)
  483. local q,r=GetWeld(wTorso,0)
  484. return a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r
  485. end
  486.  
  487. MakeAI(SpawnPoint)
  488.  
  489. ASpeed=28
  490. coroutine.resume(coroutine.create(function()
  491. SetWeld(wLSho,0,1,1,nov3,nov3,wLSho.C0.p,v3(45,0,-10),1)
  492. SetWeld(wLArm,0,1,1,nov3,nov3,wLArm.C0.p,v3(45,0,10),1)
  493. SetWeld(wRSho,0,1,1,nov3,nov3,wRSho.C0.p,v3(45,0,10),1)
  494. SetWeld(wRArm,0,1,1,nov3,nov3,wRArm.C0.p,v3(45,0,-10),1)
  495. SetWeld(wLThi,0,1,1,nov3,nov3,v3(-0.5*Scale,-0.6*Scale,-0.5*Scale),v3(125,0,-12),1)
  496. SetWeld(wLLeg,0,1,1,nov3,nov3,wLLeg.C0.p,v3(-70,0,12),1)
  497. SetWeld(wRThi,0,1,1,nov3,nov3,v3( 0.5*Scale,-0.6*Scale,-0.5*Scale),v3(125,0,12),1)
  498. SetWeld(wRLeg,0,1,1,nov3,nov3,wRLeg.C0.p,v3(-70,0,-12),1)
  499. SetWeld(wTorso,0,1,1,oTorso,nov3,v3(0,-3*Scale,0),nov3,1)
  500. wait(1)
  501. Anim='Standing'
  502. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=GetPose()
  503. for x=1,ASpeed do
  504. SetWeld(wTorso,0,x,ASpeed,wTorso.C0.p,nov3,oTorso,nov3,1)
  505. SetWeld(wLSho,0,x,ASpeed,a,b,v3(-1.5*Scale,0.5*Scale,0),v3(0,0,-10),1)
  506. SetWeld(wLArm,0,x,ASpeed,c,d,v3(0,-0.75*Scale,0),v3(10,0,10),1)
  507. SetWeld(wRSho,0,x,ASpeed,e,f,v3(1.5*Scale,0.5*Scale,0),v3(0,0,10),1)
  508. SetWeld(wRArm,0,x,ASpeed,g,h,v3(0,-0.75*Scale,0),v3(10,0,-10),1)
  509. SetWeld(wLThi,0,x,ASpeed,i,j,v3(-0.5*Scale,-1*Scale,0),v3(15,0,-5),1)
  510. SetWeld(wLLeg,0,x,ASpeed,k,l,v3(0,-0.75*Scale,0),v3(-15,0,5),1)
  511. SetWeld(wRThi,0,x,ASpeed,m,n,v3(0.5*Scale,-1*Scale,0),v3(15,0,5),1)
  512. SetWeld(wRLeg,0,x,ASpeed,o,p,v3(0,-0.75*Scale,0),v3(-15,0,-5),1)
  513. wait()
  514. end
  515. ArmAnim='None'
  516. LegAnim='None'
  517. Anim='None'
  518. end))
  519. --Target=PChar
  520. function Stay(bool,cff)
  521. BG.maxTorque=bool and v3(1,1,1)/0 or nov3 BG.cframe=cff or Torso.CFrame
  522. BP.maxForce=BG.maxTorque BP.position=Torso.Position
  523. end
  524. function fMarble(Ch,func)
  525. for i,v in pairs(Ch:children()) do
  526. for x=-1,1,2 do
  527. for y=-1,1,2 do
  528. for z=-1,1,2 do
  529. if v:findFirstChild(x..y..z) then func(v[x..y..z]) end
  530. end end end
  531. end
  532. end
  533. function ReturnAnim()
  534. local ne1,ne2=GetWeld(pNeck,0)
  535. local wt1,wt2=GetWeld(wTorso,0)
  536. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=GetPose()
  537. for x=1,ASpeed do
  538. SetWeld(wLSho,0,x,ASpeed,a,b,Oa,Ob,1)
  539. SetWeld(wLArm,0,x,ASpeed,c,d,Oc,Od,1)
  540. SetWeld(wRSho,0,x,ASpeed,e,f,Oe,Of,1)
  541. SetWeld(wRArm,0,x,ASpeed,g,h,Og,Oh,1)
  542. SetWeld(wLThi,0,x,ASpeed,i,j,Oi,Oj,1)
  543. SetWeld(wLLeg,0,x,ASpeed,k,l,Ok,Ol,1)
  544. SetWeld(wRThi,0,x,ASpeed,m,n,Om,On,1)
  545. SetWeld(wRLeg,0,x,ASpeed,o,p,Oo,Op,1)
  546. SetWeld(wTorso,0,x,ASpeed,wt1,wt2,oTorso,nov3,1)
  547. SetWeld(pNeck,0,x,ASpeed,ne1,ne2,v3(0,1.5,0)*Scale,nov3,1)
  548. wait()
  549. end
  550. end
  551.  
  552. ChatConnection=Player.Chatted:connect(function(msg)
  553. coroutine.resume(coroutine.create(function()
  554. if not Char.Parent then return end
  555. local Sep,sep=se(';',msg)
  556. local p1,p2=findplayer(Sep[2]),findplayer(Sep[3])
  557. local cmd=sep[1]
  558. --print(Sep[1])
  559. --print(LimbNames[Sep[1]])
  560. Tt=(p1 and p1.Character and p1.Character:findFirstChild'Torso') and p1.Character.Torso or nil
  561. if cmd=='sit' and (Anim=='None' or Anim=='Follow') then
  562. Anim='Sitting'
  563. Hum:MoveTo(Torso.Position,Torso)
  564. LegAnim,ArmAnim='Sit','Sit'
  565. for x=1,ASpeed do
  566. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(45,0,-10),1)
  567. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(45,0,10),1)
  568. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(45,0,10),1)
  569. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(45,0,-10),1)
  570. SetWeld(wLThi,0,x,ASpeed,Oi,Oj,v3(-0.5*Scale,-0.6*Scale,-0.5*Scale),v3(125,0,-12),1)
  571. SetWeld(wLLeg,0,x,ASpeed,Ok,Ol,Ok,v3(-70,0,12),1)
  572. SetWeld(wRThi,0,x,ASpeed,Om,On,v3( 0.5*Scale,-0.6*Scale,-0.5*Scale),v3(125,0,12),1)
  573. SetWeld(wRLeg,0,x,ASpeed,Oo,Op,Oo,v3(-70,0,-12),1)
  574. SetWeld(wTorso,0,x,ASpeed,oTorso,nov3,v3(0,-3*Scale,0),nov3,1)
  575. wait()
  576. end
  577. Anim='Sit'
  578. elseif (cmd=='stand' or cmd=='stop') and (Anim=='Roll' or Anim=='Sit' or Anim=='Follow' or Anim=='Form' or Anim=='Dance' or Anim=='Grab') then
  579. if Anim=='Sit' or Anim=='Form' or Anim=='Dance' or Anim=='Roll' then
  580. Anim='Returning'
  581. ReturnAnim()
  582. else
  583. Target=nil
  584. wait(0.2)
  585. Hum:MoveTo(Torso.Position,Torso)
  586. end
  587. LegAnim,ArmAnim,Anim='None','None','None'
  588. elseif cmd=='follow' and Tt and Anim=='None' then
  589. Anim='Follow'
  590. Target=p1.Character
  591. elseif cmd=='shoot' and Tt and RArm['1-11'].Transparency~=1 and ArmAnim=='None' then
  592. Target=p1.Character
  593. ArmAnim='Shoot'
  594. FaceBG(Tt.Position)
  595. wait(0.1)
  596. local cff=cn(pTorso.CFrame.p,v3(Tt.Position.x,pTorso.Position.y,Tt.Position.z))
  597. local ofs=cff:toObjectSpace(cn(cff*cn(1.5*Scale,0.5*Scale,0).p,Tt.CFrame*cn(0,2,0).p)*ca(90,0,0)*cn(0,-0.25*Scale,0))
  598. local x,y,z=ofs:toEulerAnglesXYZ()
  599. local rot=v3(mdeg(x),mdeg(y),mdeg(z))
  600. for q=1,ASpeed do
  601. SetWeld(wRArm,0,q,ASpeed,Og,Oh,Og,nov3,1)
  602. SetWeld(wRSho,0,q,ASpeed,Oe,Of,ofs.p,rot,1)
  603. SetWeld(wRSho,1,q,ASpeed,v3(0,0.25*Scale,0),nov3,nov3,nov3,1)
  604. wait()
  605. end
  606. for y=-1,1,2 do for x=-1,1,2 do for z=-1,1,2 do
  607. local new=RArm[x..y..z]:Clone() new.Parent=RArm game.Debris:AddItem(new,8) new.Touched:connect(function(hit) Damage(hit.Parent:findFirstChild'Humanoid') end)
  608. new.CFrame=RArm[x..y..z].CFrame*cn(0,-Scale*1.5,0) new.CanCollide=true new.Velocity=cn(new.Position,Target.Torso.Position).lookVector*((new.Position-Target.Torso.Position).magnitude*20+900)
  609. RArm[x..y..z].Transparency=1 so.Block:Play() wait(0.06)
  610. end end end
  611. RArm.Transparency=1
  612. delay(1,function()
  613. for x=-1,1,2 do for y=-1,1,2 do for z=-1,1,2 do local new=RArm[x..y..z]:Clone() new.Transparency=0 new.CanCollide=false new.Name='f'..new.Name new.Parent=RArm new.CFrame=RArm.CFrame*cn(Scale*x*2,Scale*-3,Scale*z*2)
  614. iNew{'BodyPosition',new,maxForce=v3(1,1,1)/0,position=RArm[x..y..z].Position} wait(0.14) end end end
  615. DoLoop(35,function(i) for x=-1,1,2 do for y=-1,1,2 do for z=-1,1,2 do RArm['f'..x..y..z].BodyPosition.position=RArm[x..y..z].Position if i==1 then RArm['f'..x..y..z]:Remove() RArm[x..y..z].Transparency=0 RArm.Transparency=0 end end end end end)
  616. end)
  617. for q=1,ASpeed do
  618. SetWeld(wRArm,0,q,ASpeed,Og,nov3,Og,Oh,1)
  619. SetWeld(wRSho,0,q,ASpeed,ofs.p,rot,Oe,Of,1)
  620. SetWeld(wRSho,1,q,ASpeed,nov3,nov3,v3(0,0.25*Scale,0),nov3,1)
  621. wait()
  622. end
  623. BG.maxTorque=nov3
  624. ArmAnim='None'
  625. elseif cmd=='slam' and (Anim=='None' or Anim=='Follow') and Tt then
  626. Target=p1
  627. local lTt=Tt
  628. Anim='Follow'
  629. repeat Hum:MoveTo(Tt.Position+v3(0.5,0.5,0.5),Tt) wait(0.2) until lTt~=Tt or (Tt.Position-pTorso.Position).magnitude<10+Scale*5.5 or Anim~='Follow'
  630. if Anim~='Follow' then BG.maxTorque=nov3 return end
  631. if lTt~=Tt then return end
  632. Anim,LegAnim,ArmAnim='Slam','',''
  633. Hum:MoveTo(Torso.Position,Torso)
  634. FaceBG(Tt.Position)
  635. Stay(true,BG.cframe)
  636. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p=GetPose()
  637. ASpeed2=15
  638. for x=1,ASpeed2 do
  639. SetWeld(wLSho,0,x,ASpeed2,a,b,Oa,v3(180,0,0),1)
  640. SetWeld(wRSho,0,x,ASpeed2,e,f,Oe,v3(180,0,0),1)
  641. SetWeld(wTorso,0,x,ASpeed2,nov3,nov3,v3(0,3,0)*Scale,nov3,1)
  642. wait()
  643. end
  644. for x=1,ASpeed2 do
  645. SetWeld(wTorso,0,x,ASpeed2,v3(0,3,0)*Scale,nov3,v3(0,-3*Scale+2.5,-6*Scale),v3(-89,0,0),1)
  646. wait()
  647. end
  648. AOEFind(pTorso.Position,6.5*Scale,function(Hum) Damage(Hum,3,true) Hum.Sit=true end)
  649. MeshEffect(35,Torso.CFrame*cn(0,-3.5*Scale,-6*Scale)*ca(90,0,0),nil,v3(2,2,1)*Scale,v3(12,12,5)*Scale,0.2,1,'Light stone grey',as.ring)
  650. wait(0.5)
  651. for x=1,ASpeed do
  652. SetWeld(wTorso,0,x,ASpeed,v3(0,-3*Scale+2.5,-6*Scale),v3(-90,0,0),nov3,nov3,1)
  653. SetWeld(wLSho,0,x,ASpeed,Oa,v3(180,0,0),Oa,Ob,1)
  654. SetWeld(wRSho,0,x,ASpeed,Oe,v3(180,0,0),Oe,Of,1)
  655. wait()
  656. end
  657. Stay(false)
  658. Anim,LegAnim,ArmAnim='None','None','None'
  659. elseif cmd=='boulder' and Anim=='None' then
  660. Target=p1.Character
  661. Anim,LegAnim,ArmAnim='','',''
  662. Stay(true)
  663. FaceBG(Tt.Position)
  664. for x=1,ASpeed do
  665. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(135,0,0),1)
  666. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(0,0,0),1)
  667. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(135,0,0),1)
  668. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(0,0,-10),1)
  669. SetWeld(wLThi,0,x,ASpeed,Oi,Oj,v3(-0.5,-0.5,0.25)*Scale,v3(45,0,-15),1)
  670. SetWeld(wLLeg,0,x,ASpeed,Ok,Ol,Ok,v3(0,0,0),1)
  671. SetWeld(wRThi,0,x,ASpeed,Om,On,v3( 0.5,-0.5,0.25)*Scale,v3(45,0,15),1)
  672. SetWeld(wRLeg,0,x,ASpeed,Oo,Op,Oo,v3(0,0,0),1)
  673. SetWeld(wTorso,0,x,ASpeed,oTorso,nov3,v3(0,-1.5,-1.5)*Scale,v3(-90,0,0),1)
  674. wait()
  675. end
  676. wait(0.2)
  677. local boulder=iPart{Char,1,1,1,type='WedgePart'} boulder.Material=Mat
  678. local wm=iNew{'SpecialMesh',boulder,Scale=v3(4,3,4)*Scale,MeshType='Wedge'}
  679. local wb=iNew{'Weld',boulder,Part0=RArm,Part1=boulder,C0=cn(-1.5*Scale,-2.3*Scale,0)*ca(180,180,0)}
  680. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  681. for x=1,ASpeed*2 do
  682. SetWeld(wLSho,0,x,ASpeed*2,a,b,a,v3(225,0,0),1)
  683. SetWeld(wLArm,0,x,ASpeed*2,c,d,c,v3(45,0,0),1)
  684. SetWeld(wRSho,0,x,ASpeed*2,e,f,e,v3(225,0,0),1)
  685. SetWeld(wRArm,0,x,ASpeed*2,g,h,g,v3(45,0,0),1)
  686. SetWeld(wLThi,0,x,ASpeed*2,i,j,Oi,v3(0,0,-15),1)
  687. SetWeld(wLLeg,0,x,ASpeed*2,k,l,k,v3(0,0,0),1)
  688. SetWeld(wRThi,0,x,ASpeed*2,m,n,Om,v3(0,0,15),1)
  689. SetWeld(wRLeg,0,x,ASpeed*2,o,p,o,v3(0,0,0),1)
  690. SetWeld(wTorso,0,x,ASpeed*2,q,r,nov3,nov3,1)
  691. wait()
  692. end
  693. FaceBG(Tt.Position)
  694. for x=1,ASpeed/2 do
  695. SetWeld(wLSho,0,x,math.floor(ASpeed/2),a,v3(225,0,0),a,v3(90,0,0),1)
  696. SetWeld(wLArm,0,x,math.floor(ASpeed/2),c,v3(45,0,0),c,v3(45,0,0),1)
  697. SetWeld(wRSho,0,x,math.floor(ASpeed/2),e,v3(225,0,0),e,v3(90,0,0),1)
  698. SetWeld(wRArm,0,x,math.floor(ASpeed/2),g,v3(45,0,0),g,v3(45,0,0),1)
  699. wait()
  700. end
  701. local bcf=boulder.CFrame
  702. wb:Remove()
  703. wm:Remove()
  704. boulder.Size=wm.Scale
  705. boulder.CFrame=cn(boulder.Position,Target.Torso.Position)*cn(0,3,-1)*ca(0,180,0)
  706. --boulder.Friction=0.1
  707. boulder.Elasticity=0
  708. boulder.Velocity=(boulder.CFrame*ca(0,180,0)).lookVector*((boulder.Position-Target.Torso.Position).magnitude*1+90)
  709. boulder.RotVelocity=nov3
  710. game.Debris:AddItem(boulder,8)
  711. Stay(false)
  712. ReturnAnim()
  713. Anim,LegAnim,ArmAnim='None','None','None'
  714. elseif cmd=='grab' and Tt and not Grabbing then
  715. Target=p1
  716. local lTt=Tt
  717. Anim='Follow'
  718. repeat Hum:MoveTo(Tt.Position+v3(0.5,0.5,0.5),Tt) wait(0.2) until lTt~=Tt or (Tt.Position-Stand.CFrame*cn(0,-Stand.Size.y/2+1,-2.8*Scale).p).magnitude<10 or Anim~='Follow'
  719. if Anim~='Follow' then BG.maxTorque=nov3 return end
  720. if lTt~=Tt then return end
  721. pcall(function() Tt.Parent.Humanoid.PlatformStand=true end)
  722. Hum:MoveTo(Torso.Position,Torso)
  723. Anim,LegAnim,ArmAnim='Grab','',''
  724. FaceBG(Tt.Position)
  725. for x=1,ASpeed do
  726. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(-30,0,-30),1)
  727. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(0,0,0),1)
  728. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(145,0,-30),1)
  729. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(0,0,0),1)
  730. SetWeld(wLThi,0,x,ASpeed,Oi,Oj,v3(-0.5,-0.4,0.3)*Scale,v3(70,0,0),1)
  731. SetWeld(wLLeg,0,x,ASpeed,Ok,Ol,Ok,v3(-20,0,0),1)
  732. SetWeld(wRThi,0,x,ASpeed,Om,On,v3(0.5,-0.5,-0.3)*Scale,v3(135,0,0),1)
  733. SetWeld(wRLeg,0,x,ASpeed,Oo,Op,Oo,v3(-90,0,0),1)
  734. SetWeld(wTorso,0,x,ASpeed,oTorso,nov3,v3(0,-2,-1.5)*Scale,v3(-90,0,0),1)
  735. wait()
  736. end
  737. local ofs=RArm.CFrame:toObjectSpace(Tt.CFrame)
  738. Tt.Parent.Humanoid.PlatformStand=true
  739. Grabbing=iNew{'Weld',RArm,Part0=RArm,Part1=Tt,C0=ofs}
  740. local a,b=GetWeld(Grabbing,0)
  741. for x=1,ASpeed do
  742. SetWeld(Grabbing,0,x,ASpeed,a,b,v3(0,-0.75*Scale-1,0),v3(-90,0,0),1)
  743. wait()
  744. end
  745. Stay(false)
  746. ReturnAnim()
  747. Anim,LegAnim,ArmAnim='None','None','None'
  748. elseif cmd=='dance' and (Anim=='None' or Anim=='Follow') then
  749. Hum:MoveTo(pTorso.Position,pTorso)
  750. Anim,ArmAnim,LegAnim='Dance','Dance','Dance'
  751. local ASpeed=math.floor(ASpeed/2)
  752. repeat
  753. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  754. for x=1,ASpeed do
  755. if Anim~='Dance' then break end
  756. SetWeld(wLSho,0,x,ASpeed,a,b,v3(-1.2,0.5,-0.25)*Scale,v3(35,0,30),1)
  757. SetWeld(wLArm,0,x,ASpeed,c,d,c,v3(25,0,0),1)
  758. SetWeld(wRSho,0,x,ASpeed,e,f,v3( 1.2,0.5,-0.25)*Scale,v3(45,0,-30),1)
  759. SetWeld(wRArm,0,x,ASpeed,g,h,g,v3(25,0,0),1)
  760. SetWeld(wLThi,0,x,ASpeed,i,j,i,v3(0,0,0),1)
  761. SetWeld(wLLeg,0,x,ASpeed,k,l,k,v3(0,0,0),1)
  762. SetWeld(wRThi,0,x,ASpeed,m,n,m,v3(45,0,20),1)
  763. SetWeld(wRLeg,0,x,ASpeed,o,p,o,v3(-45,0,-20),1)
  764. wait()
  765. end
  766. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  767. for x=1,ASpeed do
  768. if Anim~='Dance' then break end
  769. SetWeld(wLSho,0,x,ASpeed,a,b,v3(-1.2,0.5,-0.25)*Scale,v3(95,0,30),1)
  770. SetWeld(wLArm,0,x,ASpeed,c,d,c,v3(-10,0,0),1)
  771. SetWeld(wRSho,0,x,ASpeed,e,f,v3( 1.2,0.5,-0.25)*Scale,v3(105,0,-30),1)
  772. SetWeld(wRArm,0,x,ASpeed,g,h,g,v3(-10,0,0),1)
  773. SetWeld(wLThi,0,x,ASpeed,i,j,i,v3(45,0,-20),1)
  774. SetWeld(wLLeg,0,x,ASpeed,k,l,k,v3(-45,0,20),1)
  775. SetWeld(wRThi,0,x,ASpeed,m,n,m,v3(0,0,0),1)
  776. SetWeld(wRLeg,0,x,ASpeed,o,p,o,v3(0,0,0),1)
  777. wait()
  778. end
  779. until Anim~='Dance'
  780. elseif cmd=='roll' and (Anim=='None' or Anim=='Follow') then
  781. Target=p1
  782. local lTt=Tt
  783. Anim,ArmAnim,LegAnim='Roll','',''
  784. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  785. local n1,n2=GetWeld(pNeck,0)
  786. for x=1,ASpeed do
  787. SetWeld(wLSho,0,x,ASpeed,a,b,v3(-1.5,0.5,0)*Scale,v3(0,0,-45),1)
  788. SetWeld(wLArm,0,x,ASpeed,c,d,c,v3(0,0,90),1)
  789. SetWeld(wRSho,0,x,ASpeed,e,f,v3( 1.5,0.5,0)*Scale,v3(0,0,45),1)
  790. SetWeld(wRArm,0,x,ASpeed,g,h,g,v3(0,0,-90),1)
  791. SetWeld(wLThi,0,x,ASpeed,i,j,v3(0,1, 0.5)*Scale,v3(-30,0,0),1)
  792. SetWeld(wLLeg,0,x,ASpeed,k,l,k,v3(60,0,0),1)
  793. SetWeld(wRThi,0,x,ASpeed,m,n,v3(0,1,-0.5)*Scale,v3(30,0,0),1)
  794. SetWeld(wRLeg,0,x,ASpeed,o,p,o,v3(-60,0,0),1)
  795. SetWeld(pNeck,0,x,ASpeed,n1,n2,v3(0,0,0),n2,1)
  796. SetWeld(wTorso,0,x,ASpeed,oTorso,nov3,v3(0,-2,0)*Scale,nov3,1)
  797. wait()
  798. end
  799. tWS[2]=3
  800. repeat
  801. local cf=Torso.CFrame*cn(mran2(-1,1)*Scale,-4*Scale,0.5*Scale)*ca(90+mran(-20,20),mran(-30,30),0)
  802. MeshEffect(24,cf,cf*cn(0,4*Scale,0),v3(0.5,0.5,0.5)*Scale,v3(mran2(1,4),mran2(3,5),mran2(1,3))*Scale,0.1,1,'Dark stone grey','Brick')
  803. Hum:MoveTo(Tt.CFrame*cn(0,0,Scale).p,Tt) wTorso.C0=wTorso.C0*ca(-20,0,0) wait(0.035) until lTt~=Tt or (Tt.Position-Stand.CFrame*cn(0,-Stand.Size.y/2+1,-2.8*Scale).p).magnitude<6 or Anim~='Roll'
  804. tWS[2]=1
  805. ClearWeld(wTorso)
  806. if Anim~='Roll' then return end
  807. Hum:MoveTo(Torso.Position+v3(0,1,0),Torso)
  808. Torso.Anchored=true Torso.Velocity=nov3
  809. local cf=Stand.CFrame*cn(0,0,-1.5*Scale)*ca(-45,0,0) --iPart{Char,1,1,1,co='Black',cf=cf,an=true}
  810. MeshEffect(50,cf,nil,v3(3.5,3.5,2)*Scale,v3(11,11,6)*Scale,0.1,1,'White',as.ring)
  811. for i=1,16 do
  812. local cf=cf*ca(90,360*(i/16),0)*ca(45,0,0)
  813. MeshEffect(40,cf,cf*cn(0,10*Scale,0),v3(0.2,2,0.2)*Scale,v3(1,5,1)*Scale,0.1,1,'','Sphere')
  814. end
  815. AOEFind(cf.p,6.5*Scale,function(Hum,v) Damage(Hum,2,true) Hum.Sit=true v.Velocity=cn(pTorso.Position,v.Position).lookVector*50 end)
  816. wait(0.2)
  817. Torso.Anchored=false
  818. ReturnAnim()
  819. Hum:MoveTo(Torso.Position,Torso)
  820. Anim,LegAnim,ArmAnim='None','None','None'
  821. elseif cmd=='beam' and (Anim=='None' or Anim=='Follow') then
  822. Anim='beam'
  823. local che =iPart{Char,1,1,1,sc=Scale,co=CC[1],ma=Mat} local chew=iNew{'Weld',che ,Part0=pTorso,Part1=che}
  824. local che2=iPart{che ,0.8*Scale,0.2,0.8*Scale,co='Really black'} local che2w=iNew{'Weld',che2,Part0=che,Part1=che2}
  825. local chem=iNew{'CylinderMesh',che} iNew{'CylinderMesh',che2}
  826. local chest,chex,i={},0,0
  827. for x=-1,1,2 do for y=-1,1,2 do i=i+1 chest[i]={pTorso[x..y..'-1']} chest[i][2]=chest[i][1].Weld chest[i][3]=chest[i][2].C0
  828. local xx,yy,zz=chest[i][2].C0:toEulerAnglesXYZ() chest[i][4]=v3(mdeg(xx),mdeg(yy),mdeg(zz))
  829. chest[i][5]=cn(0.45*x*Scale,0,-0.5*Scale)*chest[i][3] chest[i][6]=chest[i][4]+v3(0,-105*x,0) end end
  830. local len=1.75
  831. local dochest=function(v,chexx,adj)
  832. local p=v/ASpeed
  833. chex=adj*p
  834. chem.Scale=v3(1,len*p,1)
  835. chew.C0=ca(chexx+chex,0,0)*cn(0,len/2*p*Scale,0)
  836. che2w.C0=cn(0,len/2*p*Scale,0)
  837. for i=1,4 do SetWeld(chest[i][2],0,v,ASpeed,chest[i][3],chest[i][4],chest[i][5],chest[i][6],1) end
  838. end
  839. for v=1,ASpeed do if Tt then FaceBG(Tt.Position) end dochest(v,-90,-45) wait() end
  840. local beam=iPart{Char,0.7*Scale,1,0.7*Scale,co='New Yeller',an=true,tr=0.3} beamm=iNew{'CylinderMesh',beam}
  841. for i=1,ASpeed*3 do
  842. local p=i/ASpeed*3
  843. chex=90*math.sin((math.pi/2)/(ASpeed*3)*i)
  844. chew.C0=ca(-135+chex,0,0)*cn(0,len/2*Scale,0)
  845. local hit,pos=ray(che2.Position,che2.Position-che2.CFrame*cn(0,-1,0).p,Char)
  846. local mag=(che2.Position-pos).magnitude local p1,p2=che2.Position+v3(mran2(-1,1),mran2(-1,1),mran2(-1,1))/3,pos+v3(mran2(-1,1),mran2(-1,1),mran2(-1,1))/3
  847. beam.CFrame=cn(p1,p2)*cn(0,0,-mag/2)*ca(90,0,0) beamm.Scale=v3(1,mag+(Scale/3),1)
  848. AOEFind(pos,Scale*2,function(Hum) Damage(Hum,2.5) end)
  849. if i%2==0 then for i=1,5 do local cf=cn(pos)*ca(0,mran(-180,180),mran(-95,95)) MeshEffect(8,cf,cf*cn(0,Scale*2.2,0),v3(0.1,0.4,0.1)*Scale,v3(0.4,3,0.4)*Scale,0.2,1,CC[mran(2,3)],as.cone) end
  850. MeshEffect(8,cn(pos),nil,v3(0.8,0.8,0.8)*Scale,v3(4,4,4)*Scale,0.2,1,CC[mran(2,3)],'Sphere') end
  851. if Tt then FaceBG(Tt.Position) end
  852. wait()
  853. end
  854. DoLoop(12,function(i) beam.Transparency=0.3+i*0.7 if i==1 then beam:Remove() end end)
  855. for v=ASpeed,0,-1 do dochest(v,-90,45) wait() end
  856. Stay(false)
  857. che:Remove()
  858. Anim='None'
  859. ---------------------------------------------------------------------------=---WWWWWWWWWWWWWWWWWW
  860. elseif cmd=='box' and (Anim=='None' or Anim=='Follow') then
  861. Anim,ArmAnim='cart','cart'
  862. for x=1,ASpeed do
  863. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(90,0,10),1)
  864. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(0,0,25),1)
  865. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(90,0,-10),1)
  866. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(0,0,-25),1)
  867. wait()
  868. end
  869. Stay(true)
  870. local spawn=RArm.CFrame*cn(0,-0.75*Scale-2,0)*ca(-90,0,0)
  871. local des=iPart{Char,1,1,1,an=true,ma=Mat,cf=spawn,ca=false}
  872. for i=1,6,0.2 do des.Size=v3(i,i,i) des.CFrame=spawn*cn(0,0,-i/2) wait() end
  873. local cart=iNew{'Model',workspace,Name='Cart'}
  874. local base=iPart{cart,4,1,5,ma=Mat,cf=des.CFrame} iNew{'BodyGyro',base}
  875. for x=-1,1,2 do
  876. local new=iPart{cart,0.5,4,5,ma=Mat,cf=base.CFrame} iNew{'Weld',new,Part0=base,Part1=new,C0=cn(1.75*x,2.5,0)}
  877. local new=iPart{cart,3.5,4,0.5,ma=Mat,cf=base.CFrame} iNew{'Weld',new,Part0=base,Part1=new,C0=cn(0,2.5,2.25*x)}
  878. end
  879. for i=6,0.8,-0.2 do des.Size=v3(i,i,i) des.CFrame=spawn*cn(0,0,-i/2) wait() end des:Remove()
  880. Stay(false)
  881. ReturnAnim()
  882. Anim,ArmAnim='None','None'
  883. elseif cmd=='crush' and Grabbing and (Anim=='None' or Anim=='Follow') then
  884. Anim,ArmAnim='crush','crush'
  885. for x=1,ASpeed do
  886. SetWeld(wLSho,0,x,ASpeed,Oa,Ob,Oa,v3(80,0,-160),1)
  887. SetWeld(wLArm,0,x,ASpeed,Oc,Od,Oc,v3(0,0,80),1)
  888. SetWeld(wRSho,0,x,ASpeed,Oe,Of,Oe,v3(80,0,160),1)
  889. SetWeld(wRArm,0,x,ASpeed,Og,Oh,Og,v3(0,0,-80),1)
  890. wait()
  891. end
  892. local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=GetPose()
  893. wait(0.2)
  894. for x=1,ASpeed/2 do
  895. SetWeld(wLSho,0,x,ASpeed/2,a,b,Oa,v3(80,0,-14),1)
  896. SetWeld(wLArm,0,x,ASpeed/2,c,d,Oc,v3(0,0,80),1)
  897. SetWeld(wRSho,0,x,ASpeed/2,e,f,Oe,v3(80,0,14),1)
  898. SetWeld(wRArm,0,x,ASpeed/2,g,h,Og,v3(0,0,-80),1)
  899. wait()
  900. end
  901. MeshEffect(35,Grabbing.Part1.CFrame,nil,v3(2,2,1)*Scale,v3(7,7,3)*Scale,0.3,1,'Light stone grey',as.ring)
  902. local crushjo=60
  903. pcall(function() for i,v in pairs({'Neck','Left Shoulder','Right Shoulder','Left Hip','Right Hip'}) do local w=Grabbing.Part1.Parent.Torso[v] w.C1=w.C1*ca(mran(-crushjo,crushjo),mran(-crushjo,crushjo),mran(-crushjo,crushjo)) end end)
  904. local hit=Grabbing.Part1
  905. Grabbing:Remove() Grabbing=nil
  906. wait(2)
  907. pcall(function() hit.Parent.Humanoid.PlatformStand=false end)
  908. ReturnAnim()
  909. Anim,ArmAnim='None','None'
  910. elseif cmd=='eat' and Grabbing and (Anim=='None' or Anim=='Follow') then
  911. Anim,ArmAnim='Eat','Eat'
  912. for x=1,ASpeed*2 do
  913. SetWeld(wRSho,0,x,ASpeed*2,Oe,Of,Oe,v3(135,0,15),1)
  914. SetWeld(wRArm,0,x,ASpeed*2,Og,Oh,Og,v3(45,-10,-100),1)
  915. wait()
  916. end
  917. wait(1)
  918. for x=1,40 do
  919. SetWeld(wRSho,0,1,1,Oe,Of,Oe,v3(135+mran(-3,3),0,15+mran(-3,3)),1)
  920. SetWeld(wRArm,0,1,1,Og,Oh,Og,v3(45,-10+mran(-12,12),-100+mran(-3,3)),1)
  921. wait(0.05)
  922. if x%2==0 then
  923. local cf=Grabbing.Part1.CFrame*ca(180,mran(-180,180),mran(-40,40))*cn(0,1.5,0)
  924. MeshEffect(24,cf,cf*cn(0,10,0),v3(0.2,2,0.2),v3(0.4,5,0.4),0.1,1,'Really red','Sphere')
  925. end
  926. end
  927. Grabbing.Part1:BreakJoints()
  928. pcall(function() Grabbing.Part1.Parent.Head:Remove() end)
  929. Grabbing:Remove() Grabbing=nil
  930. wait(2)
  931. ReturnAnim()
  932. Anim,ArmAnim='None','None'
  933. elseif cmd=='drop' and Grabbing then
  934. local hum=Grabbing.Part1.Parent.Humanoid Grabbing:Remove() Grabbing=nil hum.PlatformStand=false
  935. elseif LimbNames[Sep[1]] and (Anim=='None' or Anim=='Form') then
  936. Anim,ArmAnim,LegAnim='Form','Form','Form'
  937. local v1,v2=GetWeld(LimbNames[Sep[1]],0)
  938. local sepx=se(',',Sep[2])
  939. for x=1,ASpeed*2 do
  940. SetWeld(LimbNames[Sep[1]],0,x,ASpeed*2,v1,v2,v1,v3(tonumber(sepx[1]),tonumber(sepx[2]),tonumber(sepx[3])),1)
  941. wait()
  942. end
  943. elseif cmd=='plode' then
  944. Char:BreakJoints() wait()
  945. local Pressure=tonumber(sep[2]) or 50
  946. fMarble(Char,function(v) v.Velocity=cn(Torso.Position,v.Position).lookVector*Pressure end)
  947. for i,v in pairs(RootLimbs) do v.Velocity=cn(Torso.Position,v.Position).lookVector*Pressure end
  948. elseif cmd=='explode' then
  949. iNew{'Explosion',pTorso,Position=pTorso.Position,BlastRadius=Scale*20}
  950. elseif cmd=='goto' then
  951. pcall(function()
  952. Hum:MoveTo(Player:GetMouse().Hit.p,Player:GetMouse().Target) end)
  953. elseif cmd=='newscale' and tonumber(sep[2]) then
  954. Char:BreakJoints()
  955. Scale=tonumber(sep[2])
  956. if Scale<0.5 then Scale=0.5 end
  957. if Scale>=100 then Scale=100 end
  958. elseif cmd=='nobox' then
  959. for i,v in pairs(workspace:children()) do if v.Name=='Cart' then v:Remove() end end
  960. elseif cmd=='die' then
  961. Char:BreakJoints()
  962. elseif cmd=='brick' then
  963. iPart{workspace,12,30,30,cf=Player.Character.Torso.CFrame*cn(0,10,-20),tr=0.5,an=true}
  964. elseif cmd=='test' then
  965. local pt=Player.Character.Torso.CFrame
  966. MeshEffect(35,pt*cn(0,5,0)*ca(90,0,0),nil,v3(2,2,1)*Scale,v3(7,7,3)*Scale,0.2,1,'Light stone grey',as.ring)
  967. else
  968. end
  969. end))
  970. end)
  971. keys={}
  972. NewAnim={}
  973. Player:GetMouse().KeyDown:connect(function(k)
  974. coroutine.resume(coroutine.create(function() keys[k]=true
  975. if (k=='q' or k=='e') and (Anim=='None' or Anim=='Laser') and (ArmAnim=='None' or ArmAnim=='Laser') and not NewAnim[k] then
  976. NewAnim[k]=true
  977. local w1,w2=k=='q' and wLSho or wRSho,k=='q' and wLArm or wRArm
  978. local x=k=='q' and -1 or 1
  979. local aa,bb=GetWeld(w1,0)
  980. local cc,dd=GetWeld(w2,0)
  981. local targ=w1.Part1.CFrame*cn(0,-333,0)
  982. local tips={}
  983. local co=0
  984. local sho1=iPart{Char,0.35,RArm.Size.y/Scale+0.15 ,0.35,sc=Scale,co=CC[1]} iNew{'Weld',sho1,Part0=k=='q' and LArm or RArm,Part1=sho1} iNew{'CylinderMesh',sho1}
  985. local sho2=iPart{Char,0.3,RArm.Size.y/Scale+0.16,0.3,sc=Scale,co='Really black'} iNew{'Weld',sho2,Part0=sho1,Part1=sho2} iNew{'CylinderMesh',sho2}
  986. for x=-1,1,2 do for z=-1,1,2 do tips[#tips+1]={(k=='q' and LArm or RArm)[x..'-1'..z].Weld}
  987. co=co+0.25
  988. local asd=tips[#tips]
  989. asd[2],asd[3]=GetWeld(asd[1],0)
  990. local cf=ca(0,360*co,0)*cn(0,asd[2].y*1.8,-0.75*Scale)*ca(-20,0,0)
  991. asd[4]=cf.p
  992. local a,b,c=cf:toEulerAnglesXYZ()
  993. asd[5]=v3(mdeg(a),mdeg(b),mdeg(c))
  994. end end
  995. for u=1,ASpeed/2 do
  996. for i=1,4 do local asd=tips[i]
  997. SetWeld(asd[1],0,u,ASpeed/2,asd[2],asd[3],asd[4],asd[5],1)
  998. end wait()
  999. end
  1000. repeat Anim,ArmAnim,LaserOn='Laser','Laser',true wait()
  1001. for i=1,4 do tips[i][1].C0=ca(0,15*x,0)*tips[i][1].C0 end
  1002. targ=TweenV3(1,12,targ,Player:GetMouse().Hit.p)
  1003. w1.C0=pTorso.CFrame:toObjectSpace(cn(pTorso.CFrame*cn(1.5*Scale*x,0.5*Scale,0).p,targ))*ca(90,0,0)
  1004. w2.C0=cn(0,-0.75*Scale,0)
  1005. until not keys[k]
  1006. ClearWeld(w1) ClearWeld(w2) for i=1,4 do ClearWeld(tips[i][1]) tips[i][6],tips[i][7]=GetWeld(tips[i][1],0) end
  1007. local a,b=GetWeld(w1,0)
  1008. local c,d=GetWeld(w2,0)
  1009. for z=1,ASpeed/2 do
  1010. for i=1,4 do SetWeld(tips[i][1],0,z,ASpeed/2,tips[i][6],tips[i][7],tips[i][2],tips[i][3],1) end
  1011. SetWeld(w1,0,z,ASpeed/2,a,b,aa,bb,1)
  1012. SetWeld(w2,0,z,ASpeed/2,c,d,cc,dd,1)
  1013. wait()
  1014. end
  1015. sho1:Remove() sho2:Remove()
  1016. NewAnim[k]=false
  1017. Anim,ArmAnim,LaserOn='None','None',false
  1018. end
  1019. end)) end)
  1020. Player:GetMouse().KeyUp:connect(function(k) keys[k]=false end)
  1021. Player:GetMouse().Button1Down:connect(function()
  1022. Button=true
  1023. if keys.f and Player:GetMouse().Target and Anim=='None' then
  1024. Hum:MoveTo(Player:GetMouse().Hit.p,Player:GetMouse().Target)
  1025. elseif (keys.q or keys.e) and LaserOn then
  1026. local pick=keys.q and 'q' or 'e'
  1027. repeat
  1028. local ofs=(pick=='q' and LArm or RArm).CFrame*ca(90,0,0)
  1029. if pick=='q' and keys.e then pick='e'
  1030. elseif pick=='e' and keys.q then pick='q' end
  1031. local part=iPart{Char,0.2,0.5,0.2,sc=Scale,co=CC[mran(2,3)],an=true,ma=Mat} iNew{'CylinderMesh',part}
  1032. Projectile(ofs,2*Scale,part,ca(-90,0,0),function(hit,pos)
  1033. AOEFind(pos,Scale*2,function(Hum,v) Damage(Hum) end)
  1034. end,
  1035. function(pos)
  1036. for i=1,5 do local cf=cn(pos)*ca(0,mran(-180,180),mran(-95,95)) MeshEffect(8,cf,cf*cn(0,Scale*2.2,0),v3(0.07,0.3,0.07)*Scale,v3(0.4,3,0.4)*Scale,0.2,1,CC[mran(2,3)],as.cone) end
  1037. MeshEffect(8,cn(pos),nil,v3(0.1,0.1,0.1)*Scale,v3(3,3,3)*Scale,0.2,1,CC[mran(2,3)],'Sphere') part:Remove() end)
  1038. wait((keys.q and keys.e) and 0.2 or 0.4)
  1039. until not Button or (not keys.q and not keys.e)
  1040. elseif 'swag'=='sweg' then
  1041. end
  1042. end)
  1043. Player:GetMouse().Button1Up:connect(function()
  1044. Button=false
  1045. end)
  1046.  
  1047. WalkAnim=0
  1048. Walking=false
  1049. WalkMulp=1
  1050. WalkMax=16
  1051. Hum.WalkSpeed=18
  1052. tWS={1,1,1,1,1,1,1}
  1053.  
  1054. Marbler=0
  1055. local cou=0
  1056. while Char.Parent do
  1057. cou=cou+1
  1058. --if cou%2==0 then print(cou) end
  1059. if Hum.Health>0 then
  1060. if Torso.Velocity.y>5 then Torso.Velocity=v3(Torso.Velocity.x,5,Torso.Velocity.z) end
  1061. Walking=v3(Torso.Velocity.x,0,Torso.Velocity.z).magnitude>Hum.WalkSpeed-2 and true or false
  1062. if Walking and LegAnim=='None' then
  1063. WalkAnim=WalkAnim+WalkMulp
  1064. end
  1065. if WalkAnim>0 and not Walking then
  1066. WalkAnim=WalkAnim-1
  1067. elseif WalkAnim<0 and not Walking then
  1068. WalkAnim=WalkAnim+1
  1069. end
  1070. if math.abs(WalkAnim)>=WalkMax then WalkMulp=WalkMulp*-1 end
  1071. local WalkAdj=26
  1072. Neck.C0=Torso.CFrame:toObjectSpace(pHead.CFrame)
  1073. if ArmAnim=='None' then
  1074. SetWeld(wLSho,0,WalkAnim,WalkMax,Oa,Ob,Oa,v3(-WalkAdj*1.5,0,-10),1)
  1075. SetWeld(wLArm,0,WalkAnim,WalkMax,Oc,Od,Oc,v3(10+(WalkAnim>0 and WalkAdj or 0),0,10),1)
  1076. SetWeld(wRSho,0,WalkAnim,WalkMax,Oe,Of,Oe,v3(WalkAdj*1.5,0,10),1)
  1077. SetWeld(wRArm,0,WalkAnim,WalkMax,Og,Oh,Og,v3(10+(WalkAnim>0 and WalkAdj or 0),0,-10),1)
  1078. end
  1079. if LegAnim=='None' then
  1080. SetWeld(wLThi,0,WalkAnim,WalkMax,Oi,Oj,Oi,v3(15+WalkAdj,0,-5),1)
  1081. SetWeld(wLLeg,0,WalkAnim,WalkMax,Ok,Ol,Ok,v3(-15+(WalkAnim>0 and -WalkAdj or 0),0,5),1)
  1082. SetWeld(wRThi,0,WalkAnim,WalkMax,Om,On,Om,v3(15-WalkAdj,0,5),1)
  1083. SetWeld(wRLeg,0,WalkAnim,WalkMax,Oo,Op,Oo,v3(-15+(WalkAnim<0 and WalkAdj or 0),0,-5),1)
  1084. end
  1085. --[[
  1086. for i,v in pairs(Marble) do
  1087. v[1].C0=v[1].C0*ca(MarbleSpeed*v[2],MarbleSpeed*v[3],MarbleSpeed*v[4])
  1088. Marbler=Marbler+(MarbleSpeed*v[2])
  1089. if Marbler>MarbleMax then
  1090. v[2]=v[2]*-1
  1091. v[3]=v[3]*-1
  1092. v[4]=v[4]*-1
  1093. end
  1094. end --]]
  1095. if Anim=='Follow' and Target and Target:findFirstChild'Torso' and not BG.maxTorque~=v3(1,1,1)/0 then
  1096. Hum:MoveTo(Target.Torso.CFrame*cn(2.5*Scale,0,5*Scale).p,Target.Torso)
  1097. end
  1098. if Grabbing and (not Grabbing.Part1 or not Grabbing.Part1.Parent or Grabbing.Part1.Parent:findFirstChild'Humanoid'==nil or Grabbing.Part1.Parent.Humanoid.Health<1) then
  1099. Grabbing:Remove() Grabbing=nil
  1100. end
  1101. end--hleat
  1102. --DoLoop Package
  1103. for i,v in pairs(LoopFunctions) do
  1104. v[2]=v[2]+1
  1105. v[3](v[2]/v[1])
  1106. if v[1]<=v[2] then LoopFunctions[i]=nil end
  1107. end
  1108. local ws=18
  1109. for i=1,#tWS do ws=ws*tWS[i] end
  1110. Hum.WalkSpeed=ws
  1111. if Hum.MaxHealth~=8000 then Hum.MaxHealth=8000 Hum.Health=8000 end
  1112. Hum.Health=Hum.Health+0.1
  1113. wait(0.03)
  1114. end
  1115. ChatConnection:disconnect()
  1116. game:service'Debris':AddItem(script,0.5)
  1117. script.Disabled=true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement