Advertisement
Beeish

Brock Script roblox

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