copra50

brock

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