Wweroblox12121212

Untitled

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