jeremy394490

Brock Converted

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