Advertisement
Chaseplayzrbx_YT

Roblox BROCK script

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