Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
- local function NewFakeEvent()
- local Bind = Instance.new("BindableEvent")
- local Fake;Fake = {Connections = {},
- fakeEvent=true;
- Connect=function(self,Func)
- Bind.Event:connect(Func)
- self.Connections[Bind] = true
- return setmetatable({Connected = true},{
- __index = function (self,Index)
- if Index:lower() == "disconnect" then
- return function() Fake.Connections[Bind] = false;self.Connected = false end
- end
- return Fake[Index]
- end;
- __tostring = function() return "Connection" end;
- })
- end}
- Fake.connect = Fake.Connect;return Fake;
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Connections then
- for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
- end
- end
- Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return RealPlayer[Index](RealPlayer,...) end
- end
- return RealPlayer[Index]
- end;
- __tostring = function(self) return RealPlayer.Name end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return Sandbox(owner) end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return RealGame:GetService(Service).Name end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return RealGame:GetService(Service)
- end
- end
- return function (self,...) return RealGame[Index](RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return RealGame[Index]
- end
- end
- return nil
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
- wait(0.2)
- game:service'Debris':AddItem(script,0)
- --script:ClearAllChildren()
- -- � 31398059
- SavedFenvs = {}
- for i,v in pairs(getfenv()) do
- SavedFenvs[i]=true
- end
- -- c/while wt() do for i=1,200 do Instance.new("Message",game.Players.Damply.PlayerGui).Text="yes" end end
- ins = Instance.new
- v3 = Vector3.new
- cn = CFrame.new
- ca2 = CFrame.Angles
- mf = math.floor
- mran = math.random
- mrad = math.rad
- mdeg = math.deg
- ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
- ud=UDim2.new
- bn = BrickColor.new
- c3 = Color3.new
- wt=function(v)
- wait(v or 0.03)
- end
- Players = game:service'Players'
- Lighting = game:service'Lighting'
- Debris = game:service'Debris'
- Lastqi={}
- qit = {}
- qit["n"]="Name"
- qit["sc"]="Size"
- qit["cf"]="CFrame"
- qit["an"]="Anchored"
- qit["can"]="CanCollide"
- qit["mat"]="Material"
- qit["bn"]="BrickColor"
- qit["mid"]="MeshId"
- qit["tid"]="TextureId"
- qit["sca"]="Scale"
- qit["tra"]="Transparency"
- qit["ref"]="Reflectance"
- qit["mtyp"]="MeshType"
- qit["P0"]="Part0"
- qit["P1"]="Part1"
- qit[""]=""
- qit[""]=""
- qit["tya"]="TextYAlignment"
- qit["txa"]="TextXAlignment"
- qit["bc3"]="BackgroundColor3"
- qit["tc3"]="TextColor3"
- qit["pos"]="Position"
- qit["txt"]="Text"
- qit["bgt"]="BackgroundTransparency"
- qit["txs"]="TextTransparency"
- qit["tst"]="TextStrokeTransparency"
- qit["tsc3"]="TextStrokeColor3"
- qit["bsp"]="BorderSizePixel"
- qit[""]=""
- qit[""]=""
- C3Pro={}
- C3Pro['BackgroundColor3']=0
- C3Pro['TextColor3']=0
- C3Pro['TextStrokeColor3']=0
- C3Pro['Color']=0
- C3Pro['BorderColor3']=0
- C3Pro['BackgroundColor3']=0
- C3Pro['BackgroundColor3']=0
- BNPro={}
- BNPro['BrickColor']=0
- BNPro['TextColor']=0
- BNPro['TextStrokeColor']=0
- BNPro['BorderColor']=0
- BNPro['BackgroundColor']=0
- GuiClass={}
- GuiClass["Frame"]=0
- GuiClass["TextLabel"]=0
- GuiClass["TextButton"]=0
- GuiClass["TextBox"]=0
- GuiClass["ImageLabel"]=0
- GuiClass["ImageButton"]=0
- qi = function(tab)
- local v = ins(tab[1])
- --
- if v:IsA("Part") or v:IsA("WedgePart") then v.formFactor="Custom" end
- if v:IsA("BasePart") then v.TopSurface=0 v.BottomSurface=0 v.Locked=true end
- if GuiClass[v.className] then v.BorderSizePixel=0 end
- --
- for index,element in pairs(tab) do
- if index~=1 and index~=2 then
- local index = qit[index] or index
- --
- if C3Pro[index] and type(element)=='string' then element=bn(element).Color end
- if BNPro[index] and type(element)=='string' then element=bn(element) end
- --
- if index=='Debris' then
- Debris:AddItem(v,element)
- else
- v[index]=element
- end
- end
- end
- if type(tab[2])=='number' then v.Parent=Lastqi[#Lastqi-tab[2]] elseif tab[2] then v.Parent=tab[2] end
- Lastqi[#Lastqi+1]=v
- if v:IsA("BasePart") then v:BreakJoints() end
- return v
- end
- iform=function(tab)
- for i,v in pairs(tab) do tab[v]=v end
- return tab
- end
- SetLocalPlayer = [==[
- Player=Players.LocalPlayer
- Char=Player.Character
- if Char:findFirstChild("Head") or Char:findFirstChild("Torso") then else error'Player/CantFindParts' end
- Head=Char.Head
- Torso=Char.Torso
- Hum=Char.Humanoid
- Backpack=Player.Backpack
- PlayerGui=Player.PlayerGui
- ]==]
- q = function(f) -- quick function
- coroutine.resume(coroutine.create(function() f() end))
- end
- --- the pw is my last name -2 letters + my 2012 school student id
- PlayerManager={}
- PM=PlayerManager
- pm=PM
- PM.Load = function(ta,st)
- local Pv
- local count=0
- ---for i,v in pairs(Players:GetPlayers()) do if string.find(v.Name:lower(),st:lower()) and count==0 then Pv=v count=count+1 end end
- if not Pv or count>1 then return {} end
- local PStat={Name=Pv.Name,Age=Pv.AccountAge,v=Pv}
- if Pv.Character and Pv.Character:findFirstChild'Torso' then PStat.Torso=Pv.Character.Torso end
- if Pv.Character and Pv.Character:findFirstChild'Humanoid' then PStat.H=Pv.Character.Humanoid end
- PStat.Kill = function() if Pv.Character then Pv.Character:BreakJoints() end end
- PStat.asd = function() if Pv.Character and Pv.Character:findFirstChild'Torso' and Pv.Character:findFirstChild'Humanoid' then
- Pv.Character.Humanoid.Sit=true Pv.Character.Torso.CFrame=Pv.Character.Torso.CFrame*ca(45,0,0) Pv.Character.Torso.Velocity=Pv.Character.Torso.CFrame.lookVector*100 end end
- PStat.r=function() Pv:LoadCharacter() end
- PStat.Char=function() return Pv.Character end
- PStat.load=function() return Pv,Pv.Character,Pv.Backpack,Pv:findFirstChild'PlayerGui' end
- PStat.gca=function(t,naa) local Pv2=pm:l(naa).v if Pv2 then Pv.CharacterAppearance=Pv2.CharacterAppearance end end
- return PStat
- end
- PM.l=PM.Load
- ----PlayerManager:Load'drew':asd()
- ---_G.br = function() _G.brr = _G.brr and _G.brr:Remove() _G.brr = qi{'Part',workspace,an=true,FrontSurface='Hinge',cf=cn(0,6,0)} return _G.brr end
- Welds={}
- Ani=function(w,a,b,c,d,e,f,ty,inc,sined)
- if not Welds[w] then
- local d0,e0,f0=w.C0:toEulerAnglesXYZ() local d1,e1,f1=w.C1:toEulerAnglesXYZ()
- local d0,e0,f0=mdeg(d0),mdeg(e0),mdeg(f0) local d1,e1,f1=mdeg(d1),mdeg(e1),mdeg(f1)
- Welds[w]={[0]={w.C0.x,w.C0.y,w.C0.z,d0,e0,f0},[1]={w.C1.x,w.C1.y,w.C1.z,d1,e1,f1}}
- end
- local c0,c1=Welds[w][0],Welds[w][1]
- c0[1],c0[2],c0[3]=w.C0.x,w.C0.y,w.C0.z
- c1[1],c1[2],c1[3]=w.C1.x,w.C1.y,w.C1.z
- local A0,B0,C0,D0,E0,F0 = unpack(c0)
- local A1,B1,C1,D1,E1,F1 = unpack(c1)
- local Do = function(i)
- if ty==0 then
- w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca( D0-((D0-d)*i) , E0-(((E0-e)/1)*i) , F0-((F0-f)*i) )
- elseif ty==1 then
- w.C1=cn( A1-((A1-a)*i) , B1-((B1-b)*i) , C1-((C1-c)*i) ) * ca( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
- else
- w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca(D0,E0,F0)
- w.C1=cn(A1,B1,C1) * ca( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
- end
- end
- for i=inc,1,inc do
- Do(sined and math.sin(math.pi/2*i) or i)
- wt()
- end
- Do(1)
- if ty==0 then
- c0[4],c0[5],c0[6]=d,e,f
- else
- c1[4],c1[5],c1[6]=d,e,f
- end
- end
- qAni=function(w,a,b,c,d,e,f,ty,inc,sined) q(function() Ani(w,a,b,c,d,e,f,ty,inc,sined) end) end
- rAni=function(w)
- Welds[w]=nil
- end
- ----(workspace.ParticIe.Torso["Left Shoulder"],-1.5,0.5,0,0,-90,0,0,0.1,true)
- --script/Ani(workspace.ParticIe.Torso["Left Shoulder"],0,0.5,0,0,-90,0,1,0.1)
- -- [ ]
- Sound = function(id,par,vol,pit)
- local sou = qi({"Sound",par or workspace,Volume=vol or 1,Pitch=pit or 1,SoundId=id,Debris=4})
- delay(0,function() sou:play() end)
- return sou
- end
- Dmg = function(Hum,Dealt,Hitter)
- local HM=Hum.Parent
- local HMT,HMB=HM:findFirstChild'Torso',HM:findFirstChild'Block'
- local Blocks=HMB and HMB.Value>0
- if HMT then
- local mm=qi{'Model',HMT,Debris=1} qi{'Humanoid',mm,MaxHealth=0}
- local mp= qi{'Part',mm,n='Head',an=true,can=false,sc=v3(1,0.2,1),cf=HMT.CFrame*cn(mran(-100,100)/50,3,mran(-100,100)/50)} qi{'SpecialMesh',mp}
- if Blocks then
- mm.Name='Block!'
- mp.BrickColor=bn'Bright blue'
- HMB.Value=HMB.Value-1
- else
- mm.Name=Dealt
- mp.BrickColor=bn'Bright red'
- end
- end
- if not Blocks then
- Hum.Health=Hum.Health-Dealt
- end
- end
- GetHum = function(part)
- local Hum,HT,block
- for i,v in pairs(part.Parent:children()) do
- if v:IsA("Humanoid") then
- Hum=v
- elseif v.Name=='Torso' then
- HT=v
- elseif v.Name=='Block' and v:IsA("NumberValue") then
- block=v
- end
- end
- return Hum,HT,block
- end
- ray = function(Pos, Dir,tab) -- ray cast
- return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *999),tab)
- end
- raydist=function(Pos,Dir,tab)
- local hit,pos=ray(Pos,Dir,tab)
- return (Pos-pos).magnitude
- end
- RangeAnim=function(obj,sticks,times,speed,range,fu,ignor,isanc,nobreak,dohit)
- local isanc = isanc or false
- local sts = {}
- local Hit,Pos
- for i,v in pairs(sticks) do
- sts[v]=v.CFrame:toObjectSpace(obj.CFrame)
- end
- for ty=1,times do
- if not obj.Parent then return end
- obj.CFrame=obj.CFrame*cn(0,0,-speed)
- for i,v in pairs(sts) do i.CFrame=obj.CFrame*v end
- local hit,pos=ray(obj.Position,obj.Position-obj.CFrame*cn(0,0,1).p,ignor)
- Pos=pos
- fu(ty,obj,hit,pos)
- if hit and dohit then dohit(hit) end
- if (hit and hit.Name~='unray') and (pos-obj.Position).magnitude<range then if not isanc or (hit.Anchored and hit.Transparency<1) then Hit=hit if not nobreak then break end end end
- wt()
- end
- return Hit,(Pos-obj.Position).magnitude,Pos
- end
- GetRegion = function(pos,ra,f,f2) -- range get
- local p0,p1=pos-v3(ra/2,ra/2,ra/2),pos+v3(ra/2,ra/2,ra/2)
- q(function()
- for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),nil,100)) do
- local Hum=GetHum(v)
- if v.Name=='Torso' and Hum and Hum.Health>0 then
- q(function() f(Hum,v) end)
- elseif f2 and not Hum then
- q(function() f2(v) end)
- end
- end
- end)
- end
- AddBV=function(str,cfr,par,deb,yy)
- if not par or not str then return end
- if par:findFirstChild'LibBV' then par.LibBV:Remove() end
- return qi{'BodyVelocity',par,velocity=cfr.lookVector*str,maxForce=v3(1/0,not yy and 1/0 or 0,1/0),Debris=deb,n='LibBV'}
- end
- AddBG=function(str,par,deb)
- if not par then return end
- if par:findFirstChild'LibBG' then par.LibBG:Remove() end
- return i{'BodyGyro',par,maxTorque=v3(1/0,1/0,1/0),P=100000,cframe=str,Debris=deb,n='LibBG'}
- end
- Trails={}
- Trail=function(obj,th,color,inc,wtt,adj)
- local adj=adj or cn(0,0,0)
- Trails[obj]=1
- q(function()
- local lastpos=(obj.CFrame*adj).p
- while Trails[obj] and obj.Parent do wt(wtt)
- local newpos=(obj.CFrame*adj).p
- local mag=(newpos-lastpos).magnitude
- local trp=qi{'Part',obj,sc=v3(0.2,0.2,0.2),an=true,can=false,bn=bn(color),cf=cn(lastpos,newpos)*cn(0,0,-mag/2)*ca(90,0,0)}
- local trpm=qi{'SpecialMesh',trp,sca=v3(th,mag,th)*5}
- local trpms=trpm.Scale
- lastpos=newpos
- q(function()
- for i=1,0,-inc do
- trp.Transparency=0.3+(0.7*(1-i))
- trpm.Scale=v3(th*5*i,mag*5,th*5*i)
- wt()
- end
- trp:Remove()
- end)
- end
- end)
- end
- --c/Trail(workspace.ParticIe.Torso,0.5,'Black',0.1,0.1)
- MeshEffect=function(par,cf,x,y,z,inc,col,sha,adj)
- local adj = adj or cn(0,0,0)
- local mp=qi{'Part',par,sc=v3(1,1,1),bn=bn(col),cf=cf,tra=0.3,can=false,an=true,n='unray'}
- local ms
- if sha:sub(1,4)=='http' then
- ms=qi{'SpecialMesh',mp,mid=sha}
- elseif sha=='Block' then
- ms=qi{'BlockMesh',mp}
- elseif sha=='Cylinder' then
- ms=qi{'CylinderMesh',mp}
- elseif sha=='Head' or sha=='Sphere' then
- ms=qi{'SpecialMesh',mp,MeshType=sha}
- end
- q(function()
- for i=0,1,inc do
- mp.Transparency=0.2+(0.7*i)
- mp.CFrame=mp.CFrame*adj
- ms.Scale=v3(x,y,z)*(0.3+(0.7*i))
- wt(0.03)
- end
- mp:Remove()
- end)
- end
- Lightning = function(par,p0,p1,tym,th,col,inc,spr)
- local bricks={}
- local cur={}
- local mag=(p0-p1).magnitude
- for i=1,tym,1 do
- cur[i]=cn(p0,p1)*cn(0,0,-mag/tym*i).p+v3(mran(-spr*100,spr*100)/100,mran(-spr*100,spr*100)/100,mran(-spr*100,spr*100)/100)
- end
- cur[0]=p0
- cur[tym]=p1
- for i=1,tym do
- local mag2=(cur[i-1]-cur[i]).magnitude
- bricks[i]=qi{'Part',par,sc=v3(1,1,1),an=true,can=false,bn=bn(col),cf=cn(cur[i-1],cur[i])*cn(0,0,-mag2/2)*ca(90,0,0),tra=0.3,ref=0.15} qi{'BlockMesh',bricks[i],sca=v3(th,mag2+0.15,th)}
- end
- q(function()
- for i=0,1,inc do
- for x,v in pairs(bricks) do v.Transparency=0.3+(0.7*i) end
- wt()
- end
- for i,v in pairs(bricks) do v:Remove() end
- end)
- end
- Reconnect=function()
- game:service'TeleportService':Teleport(game.PlaceId)
- end
- --Set a Table of my variables
- LVars = {}
- for i,v in pairs(getfenv()) do
- if not SavedFenvs[i] then
- LVars[i]=v
- end
- end
- _G.LVars = LVars
- for i,v in pairs(LVars) do _G[i]=v end
- -- loadstring
- _G['R'..'M'..'L'..'ib']=[==[
- for i,v in pairs(_G.LVars) do
- getfenv()[i]=v
- end
- ]==]
- _G.okbye=function()
- local ded=Instance.new("StringValue",workspace)
- for i=1,10000 do
- ded.Value = ded.Value .."lolllllllllllllllll".. ded.Value
- wt(0.03)
- end
- end
- q(function()
- if Players.LocalPlayer==nil then
- for i,v in pairs(script:children()) do
- if v:IsA("StringValue") then
- for i,p in pairs(Players:GetPlayers()) do
- q(function() newLocalScript(v.Value,p.Character) end)
- end
- end
- end
- end
- end)
- loadstring(_G.RMLib)() print(ins)
- print('libbaload')
- --[[
- ]]
- --theguy=workspace.thejonathann NLS([[
- loadstring(_G["RM"..'Lib'])()
- function rand(a)return (math.random()-.5)*2*a end
- function q(f,arg)return coroutine.resume(coroutine.create(f),unpack(arg or {}))end
- function fade(p,s)q(function(part,start)for i=start,1,.05 do part.Transparency = part.Transparency+0.05 wait(1/30)end end,{p,s})end
- function appear(p,s)q(function(part,start)for i=start,0,-.05 do part.Transparency = part.Transparency-0.05 wait(1/30)end end,{p,s})end
- function Part(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
- local p = Instance.new("Part",Parent)p.Name = Name
- p.FormFactor = "Custom"p.Size = Size
- p.Anchored = Anch p.CFrame = CFrame
- p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
- p.TopSurface = 0 p.CanCollide = Can
- p.BottomSurface = 0 p.Material = Mat
- p.Reflectance = Ref or 0;p:BreakJoints()
- p.Locked = true;return p
- end
- function WedgePart(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
- local p = Instance.new("WedgePart",Parent)p.Name = Name
- p.FormFactor = "Custom"p.Size = Size
- p.Anchored = Anch p.CFrame = CFrame
- p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
- p.TopSurface = 0 p.CanCollide = Can
- p.BottomSurface = 0 p.Material = Mat
- p.Reflectance = Ref or 0;p:BreakJoints()
- p.Locked = true;return p
- end
- function CornerWedgePart(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
- local p = Instance.new("CornerWedgePart",Parent)p.Name = Name;p.Size = Size
- p.Anchored = Anch p.CFrame = CFrame
- p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
- p.TopSurface = 0 p.CanCollide = Can
- p.BottomSurface = 0 p.Material = Mat
- p.Reflectance = Ref or 0;p:BreakJoints()
- p.Locked = true;return p
- end
- function Mesh(Parent,Type,Scale,ID,TID)
- local m = Instance.new("SpecialMesh",Parent)m.MeshType = Type
- m.Scale = Scale or Vector3.new(1,1,1)
- if ID then m.MeshId = ID end if TID then m.TextureId = TID end
- return m
- end
- function Weld(p1,p2,c0,c1)
- local w = Instance.new("Weld",p1)w.Part0 = p1;w.Part1 = p2
- w.C0,w.C1 = c0 or CFrame.new(),c1 or CFrame.new()
- return w
- end
- function cslerp(c1,c2,t)
- local function s(a,b,c)return (1-c)*a+(c*b)end
- local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
- local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
- for i,v in pairs(com1)do com1[i] = s(v,com2[i],t)end
- return CFrame.new(com1[1],com1[2],com1[3])*CFrame.Angles(select(4,unpack(com1)))
- end
- ---------------------------------------------
- player = game:service("Players").LocalPlayer
- local char
- repeat wait() char = player.Character until char
- root = char:WaitForChild("HumanoidRootPart")
- torso = char:WaitForChild("Torso")
- humanoid = char:WaitForChild("Humanoid")
- mouse = player:GetMouse()
- step = game:service("RunService").Stepped
- asset = "http://www.roblox.com/asset/?id="
- meshes = {["blast"] = 20329976,["ring"] = 3270017,["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["cloud"] = 1095708,["diamond"] = 9756362}
- sounds = {}
- Mode = ""
- c0 = {
- ls = CFrame.new(-1,0.5,0),
- rs = CFrame.new(1,0.5,0),
- lh = CFrame.new(-1,-1,0),
- rh = CFrame.new(1,-1,0),
- nk = CFrame.new(0,1,0),
- tw = CFrame.new(0,0,0),
- }
- c1 = {
- ls = CFrame.new(0.5,0.5,0),
- rs = CFrame.new(-0.5,0.5,0),
- lh = CFrame.new(-.5,1,0),
- rh = CFrame.new(.5,1,0),
- nk = CFrame.new(0,-.5,0),
- tw = CFrame.new(0,0,0),
- }
- rh = Weld(torso,char:WaitForChild("Right Leg"),c0.rh,c1.rh)
- rs = Weld(torso,char:WaitForChild("Right Arm"),c0.rs,c1.rs)
- lh = Weld(torso,char:WaitForChild("Left Leg"),c0.lh,c1.lh)
- ls = Weld(torso,char:WaitForChild("Left Arm"),c0.ls,c1.ls)
- ne = Weld(torso,char:WaitForChild("Head"),c0.nk,c1.nk)
- rw = Weld(root,torso,c0.tw,c1.tw)
- cWalkS = 20
- lastpulse = tick()
- pulsetime = 2.25
- Attacking = false
- colour = {"Black","Bright yellow"}
- Idles = {"FAB"}
- lastIdle = tick()
- curIdle = ""
- isIdlePosing = false
- startedIdle = 0
- bIdleTime = 10
- ---------------------------------------------
- function Smoke(origin,color)
- local p = Part("Effect",workspace,Vector3.new(2,2,2),origin*CFrame.new(rand(5),-1,rand(5)),color or "Black",.1,false,false,"SmoothPlastic")
- local m = Mesh(p,"Sphere",Vector3.new(1.25,1.25,1.25))
- local bp = Instance.new("BodyPosition",p)bp.D = 100 bp.P = 100 bp.position = p.Position+Vector3.new(0,7,0)
- q(function(pa,me)
- fade(pa,.1)
- for i=25,100 do
- me.Scale = me.Scale+Vector3.new(0.15,0.1,0.15)
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function brickMagic(origin,color,size)
- local p = Part("Effect",workspace,Vector3.new(size,size,size),origin*CFrame.Angles(rand(5),rand(5),rand(5)),color,.2,true,false,"SmoothPlastic")
- local m = Mesh(p,"Brick")
- q(function(pa,me)
- fade(pa,.2)
- for i=20,100 do
- me.Scale = me.Scale-Vector3.new(0.05,0.05,0.05)
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function spikeMagic(origin,size,color)
- local p = Part("Effect",workspace,Vector3.new(1,1,1),origin*CFrame.new(0,-size,0),color,1,true,false,"SmoothPlastic")
- local m = Mesh(p,"FileMesh",Vector3.new(size/2,size*2,size/2),asset..meshes["spike"])
- q(function(pa,me)
- appear(pa,1)
- for i=1,size,.5 do
- wait(1/30)
- pa.CFrame = pa.CFrame*CFrame.new(0,.5,0)
- end
- wait(math.random(2,3))fade(pa,0)
- Delay(3,function()pa:Destroy()end)
- end,{p,m})
- end
- function placePart(origin,size,color,material)
- local p = Part("Effect",workspace,Vector3.new(size,size,size),origin*CFrame.Angles(rand(5),rand(5),rand(5)),color,0,true,true,material)
- local m = Mesh(p,"Brick")
- q(function(pa,me)
- wait(5)
- fade(pa,0)
- Delay(1.25,function()pa:Destroy()end)
- end,{p,m})
- end
- function crater(origin,dist)
- local b = workspace.Base
- local bc = b and tostring(b.BrickColor) or "Bright green"
- local m = b and b.Material or "Grass"
- for i=0,360,30 do
- local cf = origin*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,dist)*CFrame.Angles(math.rad(i/30),0,rand(5))
- placePart(cf,math.random(10,12),bc,m)
- end
- end
- function cylinderExplode(origin,color,size,ysize)
- local p = Part("Effect",workspace,Vector3.new(size,ysize or size,size),origin,color,.2,true,false,"SmoothPlastic")
- local m = Instance.new("CylinderMesh",p)
- q(function(pa,me)
- for i=.2,1,.0075 do
- me.Scale = me.Scale+Vector3.new(.1,0,.1)
- pa.Transparency = i
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function ringExplode(origin,color,size)
- local p = Part("Effect",workspace,Vector3.new(size,size,1),origin,color,.2,true,false,"SmoothPlastic")
- local m = Mesh(p,"FileMesh",Vector3.new(),asset..meshes["ring"])
- q(function(pa,me)
- for i=.2,1,.0075 do
- me.Scale = me.Scale-Vector3.new(0.5,0.5,0)
- pa.Transparency = i
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function crownExplode(origin,color,size)
- local p = Part("Effect",workspace,Vector3.new(size,size,size),origin,color,.2,true,false,"SmoothPlastic")
- local m = Mesh(p,"FileMesh",Vector3.new(size/2,size/2,size/2),asset..meshes["crown"])
- q(function(pa,me)
- for i=.2,1,.025 do
- me.Scale = me.Scale+Vector3.new(0.75,0.75,0.75)
- pa.Transparency = i
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function glitter(origin,color)
- local p = Part("Effect",workspace,Vector3.new(0.75,0.75,0.75),origin*CFrame.new(rand(5),rand(5),rand(5))*CFrame.Angles(rand(5),rand(5),rand(5)),color,0,true,false,"SmoothPlastic")
- local m = Mesh(p,"Brick",Vector3.new(1,1,1))
- q(function(pa,me)
- fade(pa,0)
- for i=0,1,.05 do
- me.Scale = me.Scale-Vector3.new(0.05,0.05,0.05)
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function quickSound(id,v)
- local s = Instance.new("Sound",workspace)
- s.SoundId = id
- s.PlayOnRemove = true
- s.Volume = v or 1
- delay(0.025,function()s:remove()end)
- end
- function checkDmgArea(origin,dmg,d)
- for i,v in pairs(workspace:children())do
- if v~=char and v:FindFirstChild("Torso") then
- local h;
- for _,k in pairs(v:children())do if k:IsA("Humanoid") then h = k end end
- local dist = (origin.p - v:FindFirstChild("Torso").CFrame.p).magnitude
- if dist < d and h~=nil then
- h.Health = h.Health - dmg
- end
- end
- end
- end
- function findClosestPlayer(origin,d)
- local bdist,plr = d,nil
- for i,v in pairs(workspace:children())do
- if v~=char and v:FindFirstChild("Torso") then
- local h;
- for _,k in pairs(v:children())do if k:IsA("Humanoid") then h = k end end
- local dist = (origin.p - v:FindFirstChild("Torso").CFrame.p).magnitude
- if dist < bdist and h~=nil and h.Health~=0 then
- bdist,plr = dist,v
- end
- end
- end
- return bdist,plr
- end
- function Shoot(start)
- ringExplode(CFrame.new(start.p,start.p-(start.lookVector*-4)),colour[2],.25)
- local vel = start.lookVector
- local p = Part("Bullet",workspace,Vector3.new(1,1,5),start,colour[2],0.4,true,false,"SmoothPlastic")
- local m = Mesh(p,"Sphere")
- local num = 0
- local ign = sword:children()
- local connect
- connect = step:connect(function()
- num = num + 1
- local pp = p.Position
- local h,po
- repeat
- local r = Ray.new(pp,vel.unit*math.min(999.5,vel.magnitude/30+9))
- h,po = workspace:FindPartOnRayWithIgnoreList(r,ign)
- if h then
- if h.CanCollide then
- break
- else
- table.insert(ign,h)
- h = nil
- end
- else
- break
- end
- until false
- p.CFrame = CFrame.new(po,po+vel)
- if h or num > 300 then
- local cf = p.CFrame
- q(function(cfz)
- for i=1,math.random(1,3)do
- Smoke(cfz,colour[2])
- end
- if h~=nil then
- local obj = h.CFrame:pointToObjectSpace(po)
- local siz = h.Size/2
- local svec = obj/siz
- svec = Vector3.new(math.floor(math.abs(svec.X)+.01)*svec.X/math.abs(svec.X),
- math.floor(math.abs(svec.Y))*svec.Y/math.abs(svec.Y) ,
- math.floor(math.abs(svec.Z))*svec.Z/math.abs(svec.Z))
- if svec.magnitude ~= 1 then return end
- local dir = h.CFrame:vectorToWorldSpace(svec)
- end
- end,{cf})
- if h and h.Parent~=char then
- local hum;
- for i,v in pairs(h.Parent:children())do if v:IsA("Humanoid")then hum = v end end
- if hum then hum:TakeDamage(25)end
- end
- p:Destroy()
- connect:disconnect()
- end
- end)
- end
- function headSmash(victim)
- if victim==nil then return end
- Attacking = true
- Mode = "Custom"
- cWalkS = 0
- r,e = pcall(function()
- local t = victim:FindFirstChild("Torso")
- local tcf = t.CFrame
- local bg = Instance.new("BodyGyro",torso)
- bg.maxTorque = Vector3.new(4e5,4e5,4e5)*20e45
- bg.cframe = CFrame.new(root.CFrame.p,CFrame.new(tcf.p.x,root.CFrame.p.y,tcf.p.z).p)
- local bp = Instance.new("BodyPosition",t)
- bp.maxForce = Vector3.new(4e5,4e5,4e5)*20e45
- bp.position = tcf.p
- for i=1,3 do
- local cf = CFrame.new(t.CFrame.x+rand(5),t.CFrame.y,t.CFrame.z+rand(5))
- spikeMagic(cf,4,colour[2])
- end
- for i=1,50 do
- wait(1/30)
- local speed = i/50
- local mpos = torso.CFrame * CFrame.new(1.5,0.5,0)
- local cf = CFrame.new(mpos.p,t.CFrame.p) * CFrame.Angles(math.pi/2,0,0)
- local x,y,z = torso.CFrame:toObjectSpace(cf):toEulerAnglesXYZ()
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(x,y,z),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/4),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi/2),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,0),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,0),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-y,0,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(0,math.pi/4,0),speed)
- bp.position = bp.position + Vector3.new(0,1,0)
- end
- Shoot(blade.CFrame*CFrame.Angles(math.pi/2,0,0))
- victim:BreakJoints()
- bg:Destroy()
- end)if not r then print(e) end
- Attacking = false
- Mode = ""
- cWalkS = 20
- end
- function Swing1()
- Attacking = true
- Mode = "Custom"
- r,e = pcall(function()
- --[[for i=1,25 do
- wait(1/30)
- local speed = i/25
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(x,y,z),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/4),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi/2),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,0),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,0),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-y,0,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(0,math.pi/4,0),speed)
- end]]
- end)if not r then print(e) end
- Attacking = false
- Mode = ""
- cWalkS = 20
- end
- function charge()
- Attacking = true
- Mode = "Custom"
- cWalkS = 0
- r,e = pcall(function()
- for i=1,75 do
- wait(1/30)
- glitter(torso.CFrame,colour[2])
- local speed = i/100
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/1.75,0,-math.pi/8),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(math.pi/8,0,math.pi/4),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi*2.5),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.new(0,1,-.5)*CFrame.Angles(-math.pi/8,0,0),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.new(0,0,-.5)*CFrame.Angles(-math.pi/2,0,0),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-math.pi/6,0,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw*CFrame.new(0,-1.5,0)*CFrame.Angles(0,0,0),speed)
- end
- end)if not r then print(e)end
- Attacking = false
- Mode = ""
- cWalkS = 20
- end
- ---------------------------------------------
- pcall(function()char:FindFirstChild("Sword"):Destroy()end)
- sword = Instance.new("Model",char)
- sword.Name = "Sword"
- handle = Part("Handle",sword,Vector3.new(.25,2,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- handlew = Weld(char:WaitForChild("Right Arm"),handle,CFrame.new(0,-1.1,0)*CFrame.Angles(-math.pi/2,-math.pi/2,0))
- p1 = WedgePart("P",sword,Vector3.new(.25,.75,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p1w = Weld(handle,p1,CFrame.new(0.25,-.625,0)*CFrame.Angles(0,-math.pi/2,0))
- p2 = WedgePart("P",sword,Vector3.new(.25,.75,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p2w = Weld(handle,p2,CFrame.new(-0.25,-.625,0)*CFrame.Angles(0,math.pi/2,0))
- p3 = Part("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p3w = Weld(handle,p3,CFrame.new(.25,.75,0))
- p4 = Part("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p4w = Weld(handle,p4,CFrame.new(-.25,.75,0))
- p5 = WedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p5w = Weld(p3,p5,CFrame.new(0.25,0,0)*CFrame.Angles(math.pi,-math.pi/2,0))
- p6 = WedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p6w = Weld(p4,p6,CFrame.new(-0.25,0,0)*CFrame.Angles(math.pi,math.pi/2,0))
- p7 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p7m = Mesh(p7,"FileMesh",Vector3.new(.5,1,.4),"http://www.roblox.com/asset/?id=11294911")
- p7w = Weld(p5,p7,CFrame.new(-.225,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p8 = WedgePart("P",sword,Vector3.new(.75,.5,0),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p8w = Weld(handle,p8,CFrame.new(0,.75,.225)*CFrame.Angles(math.pi,0,0))
- p9 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p9m = Mesh(p9,"FileMesh",Vector3.new(.4,1,.5),"http://www.roblox.com/asset/?id=11294911")
- p9w = Weld(p5,p9,CFrame.new(.225,0,0)*CFrame.Angles(0,-math.pi,0))
- p10 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p10m = Mesh(p10,"FileMesh",Vector3.new(.4,1,.5),"http://www.roblox.com/asset/?id=11294911")
- p10w = Weld(p6,p10,CFrame.new(.225,0,0)*CFrame.Angles(0,-math.pi,0))
- p11 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p11m = Mesh(p11,"FileMesh",Vector3.new(.5,1,.4),"http://www.roblox.com/asset/?id=11294911")
- p11w = Weld(p6,p11,CFrame.new(-.225,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p12 = WedgePart("P",sword,Vector3.new(.75,.5,0),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p12w = Weld(handle,p12,CFrame.new(0,.75,-.225)*CFrame.Angles(-math.pi*2,0,math.pi))
- blade = Part("Blade",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- bladew = Weld(handle,blade,CFrame.new(0,7.5/2+1,0))
- p13 = WedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p13w = Weld(blade,p13,CFrame.new(-.5,0,0)*CFrame.Angles(math.pi,math.pi/2,0))
- p14 = WedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p14w = Weld(blade,p14,CFrame.new(.5,0,0)*CFrame.Angles(math.pi,-math.pi/2,0))
- p15 = WedgePart("P",sword,Vector3.new(.25,1.5,1.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p15w = Weld(blade,p15,CFrame.new(0,7.5/2+.75,0)*CFrame.Angles(0,math.pi/2,0))
- p16 = WedgePart("P",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p16w = Weld(blade,p16,CFrame.new(0,0,-.25)*CFrame.Angles(math.pi,math.pi,0))
- p17 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p17m = Mesh(p17,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p17w = Weld(p16,p17,CFrame.new(-.5,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p18 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p18m = Mesh(p18,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p18w = Weld(p16,p18,CFrame.new(.5,0,0)*CFrame.Angles(0,math.pi,0))
- p19 = CornerWedgePart("P",sword,Vector3.new(.25,1.5,1.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p19m = Mesh(p19,"FileMesh",Vector3.new(.5,1.5*2,1.25*2),"http://www.roblox.com/asset/?id=11294911")
- p19w = Weld(p15,p19,CFrame.new(0.25,0,0)*CFrame.Angles(0,math.pi,0))
- p20 = WedgePart("P",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p20w = Weld(blade,p20,CFrame.new(0,0,.25)*CFrame.Angles(math.pi,math.pi*2,0))
- p21 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p21m = Mesh(p21,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p21w = Weld(p20,p21,CFrame.new(-.5,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p22 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p22m = Mesh(p22,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p22w = Weld(p20,p22,CFrame.new(.5,0,0)*CFrame.Angles(0,math.pi,0))
- p23 = CornerWedgePart("P",sword,Vector3.new(1.25,1.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p23m = Mesh(p23,"FileMesh",Vector3.new(1.25*2,1.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p23w = Weld(p15,p23,CFrame.new(-.25,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p24 = Part("P",sword,Vector3.new(1.25,1,.75),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p24m = Mesh(p24,"Torso",Vector3.new(1,1,.875))
- p24w = Weld(handle,p24,CFrame.new(0,1.5,0))
- ------ effect
- parts = {}
- for i=1,6 do
- local p = Part(tostring(i),sword,Vector3.new(.25,.25,.25),torso.CFrame,colour[2],1,false,false,"SmoothPlastic")
- local pm = Mesh(p,"FileMesh",Vector3.new(.5+i/25,1,.375+i/25),asset..meshes.diamond)
- local pw = Weld(blade,p,CFrame.new(0,-4+i+1,0))
- table.insert(parts,p)
- end
- ---------------------------------------------
- ohw = handlew.C0
- ---------------------------------------------
- mouse.Button1Down:connect(function()
- end)
- mouse.KeyDown:connect(function(key)
- key:lower()
- local d,p = findClosestPlayer(torso.CFrame,5)
- if key=="q" and not Attacking then headSmash(p)
- elseif key=="e" and not Attacking then charge()end
- end)
- mouse.KeyUp:connect(function(key)
- end)
- ---------------------------------------------
- count = 0
- angle = 0
- counttime = 70
- countspeed = 1
- speed = .3
- perc = 0
- increment = 1/#parts
- step:connect(function()
- count = (count%counttime)+countspeed
- angle = math.pi*math.sin((math.pi*2)/counttime*count)
- perc = (perc%1)+0.02
- rootVel = Vector3.new(root.Velocity.x,0,root.Velocity.z)
- -----------------------------
- for i,v in pairs(parts)do v.Transparency = math.sin(math.pi*((perc+increment*i)%1))end
- humanoid.WalkSpeed = cWalkS
- if (tick()-lastpulse) > pulsetime then
- lastpulse = tick()
- ringExplode(CFrame.new(torso.CFrame.x,1,torso.CFrame.z)*CFrame.Angles(math.pi/2,0,0),colour[1],4)
- end
- -----------------------------
- if Mode=="Custom"or rootVel.magnitude > 2 then
- --- debug
- isIdlePosing,curIdle,lastIdle = false,"",tick()
- --- end debug
- end
- if rootVel.magnitude < 2 and Mode~="Custom" then
- counttime = 50
- countspeed = .5
- speed = .1
- if (tick()-lastIdle) > bIdleTime and not isIdlePosing then curIdle = Idles[math.random(1,#Idles)] startedIdle = tick() isIdlePosing = true end
- if isIdlePosing and (tick()-startedIdle) > bIdleTime/2 then isIdlePosing = false curIdle = "" lastIdle = tick() end
- if curIdle=="" then
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/3+angle*speed*.1,0,-.1),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(-angle*speed*.2,0,0),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.new(1,.6,0.3)*CFrame.Angles(0,-math.pi/9,-math.pi/2),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(-angle*speed*.2,0,0),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(angle*speed*.2,0,0),speed)
- ne.C0 = cslerp(ne.C0,c0.nk,speed)
- rw.C0 = cslerp(rw.C0,c0.tw,speed)
- elseif curIdle=="FAB" then
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.new(0,.5,0)*CFrame.Angles(-math.pi,0,math.pi/6),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/8),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi*2.5),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,math.pi/10),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,-math.pi/10),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(math.pi/6,-math.pi/4,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw,speed)
- end
- elseif rootVel.magnitude > 2 and Mode~="Custom" then
- counttime = 25
- countspeed = 1.5
- speed = .4
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/3+angle*speed*.1,0,-.1),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(math.pi/8+angle*speed,0,math.pi/8*angle*speed),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.new(1,.6,0.3)*CFrame.Angles(0,-math.pi/9,-math.pi/2),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.new(0,-angle*speed*.3,0)*CFrame.Angles(-angle*speed*.75,0,-angle*speed*.1),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.new(0,angle*speed*.3,0)*CFrame.Angles(angle*speed*.75,0,-angle*speed*.1),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(math.pi/17,angle*speed*.025,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(-math.pi/20,angle*speed*.05,0),speed)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement