Advertisement
aiden50_70

Dragon Ball Rage Pathfinding Fightbot

Feb 25th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.56 KB | None | 0 0
  1. function Chat(a)local b=a;local c="All"local d=game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest;d:FireServer(b,c)end;local e=game:service("Players").LocalPlayer;repeat wait()until e.Character;Chat("Loaded")local f=e.Character;local g=e:GetMouse()function TransformationChat()local h={"I, am a super saiyan!","AAAAAAAAAAAAAAAAAAAAAAHHHHHH!!!!","HAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!","I WILL MAKE YOU PAY, TRASH!","TIME FOR YOUR INTRODUCTION TO THE GROUND!"}Chat(h[math.random(1,#h)])end;function RequestCombat()Chat("I would like to engage in combat. The rules are as simple as no flying.")end;function AttackChat()local h={"HUH!","YAH!","EAAH!"}Chat(h[math.random(1,#h)])end;function Combat()local i={["LeftLowerArm"]=game:GetService("Players").LocalPlayer.Character.LeftLowerArm,["RightUpperArm"]=game:GetService("Players").LocalPlayer.Character.RightUpperArm,["LeftFoot"]=game:GetService("Players").LocalPlayer.Character.LeftFoot,["RightHand"]=game:GetService("Players").LocalPlayer.Character.RightHand,["RightLowerArm"]=game:GetService("Players").LocalPlayer.Character.RightLowerArm,["LeftUpperLeg"]=game:GetService("Players").LocalPlayer.Character.LeftUpperLeg,["LeftUpperArm"]=game:GetService("Players").LocalPlayer.Character.LeftUpperArm,["Character"]=game:GetService("Players").LocalPlayer.Character,["LeftHand"]=game:GetService("Players").LocalPlayer.Character.LeftHand,["RightFoot"]=game:GetService("Players").LocalPlayer.Character.RightFoot,["Humanoid"]=game:GetService("Players").LocalPlayer.Character.Humanoid,["RightLowerLeg"]=game:GetService("Players").LocalPlayer.Character.RightLowerLeg,["RightUpperLeg"]=game:GetService("Players").LocalPlayer.Character.RightUpperLeg,["LeftLowerLeg"]=game:GetService("Players").LocalPlayer.Character.LeftLowerLeg}local d=game:GetService("ReplicatedStorage").Remotes.Training.Combat;d:InvokeServer(i)end;local j=1;local k={"Right","Left"}function EnergyBlast()if j==1 then j=2 else j=1 end;local i=k[j]local d=game:GetService("ReplicatedStorage").Remotes.Actions.EnergyBlast;d:InvokeServer(i)end;function Request(l)local i="Modes"local m=l or 9;local d=game:GetService("ReplicatedStorage").Remotes.RequestSkill;d:InvokeServer(i,m)end;InMode=false;function Transform()local i={["Humanoid"]=game:GetService("Players").LocalPlayer.Character.Humanoid,["Head"]=game:GetService("Players").LocalPlayer.Character.Head,["UpperTorso"]=game:GetService("Players").LocalPlayer.Character.UpperTorso,["HumanoidRootPart"]=game:GetService("Players").LocalPlayer.Character.HumanoidRootPart,["Character"]=game:GetService("Players").LocalPlayer.Character}local m=false;local d=game:GetService("ReplicatedStorage").Remotes.Modes.Transform;if InMode==false then TransformationChat()end;d:InvokeServer(i,m)end;function EnableFlight()local i=true;local m={["HumanoidRootPart"]=game:GetService("Workspace").tollepuxis.HumanoidRootPart,["Humanoid"]=game:GetService("Workspace").tollepuxis.Humanoid}local n=f.HumanoidRootPart.CFrame;local d=game:GetService("ReplicatedStorage").Remotes.Training.Flight;d:InvokeServer(i,m,n)end;function DisableFlight()local i=false;local m={}local n=f.HumanoidRootPart.CFrame;local d=game:GetService("ReplicatedStorage").Remotes.Training.Flight;d:InvokeServer(i,m,n)end;Enabled=false;function AutoCombat()if Enabled==false then Enabled=true;Chat("Enabled")else Enabled=false;Chat("Disabled")end end;local o=false;f.Humanoid.Died:Connect(function()if o==false then o=true;local h={"Ugh...","Ack...","Patheti...","Not like this...","Ahh...","Ough..."}Chat(h[math.random(1,#h)])end end)g.KeyDown:Connect(function(p)p=string.lower(p)if p=="k"and o==false then AutoCombat()elseif p=="x"then RequestCombat()end end)local q=nil;local r=game:GetService("PathfindingService")function CreatePath(s)return r:ComputeRawPathAsync(f.HumanoidRootPart.Position,s.Position,5000)end;local t=Instance.new("Model",workspace)t.Name="PathModel"local u=false;function Evaluate(v)if v then local w=v:GetPointCoordinates()u=false;if#w>2 then for x=2,#w do local y=Instance.new("Part",t)y.CanCollide=false;y.Anchored=true;y.Transparency=1;y.CFrame=CFrame.new(w[x])game:GetService("Debris"):AddItem(y,.1)f.Humanoid:MoveTo(y.Position)f.Humanoid.MoveToFinished:Wait(.1)end;t:ClearAllChildren()u=true end end end;local z=Instance.new("BodyGyro")z.P=0;z.MaxTorque=Vector3.new(999,999,999)*99999999999999999e9999999;z.CFrame=CFrame.new()local A=false;local B=Workspace.CurrentCamera;function FixCamera()B.CameraType="Custom"B.CameraSubject=f.Humanoid end;spawn(function()while true do wait()if q==nil then if o==false then FixCamera()end end end end)FixCamera()spawn(function()while wait(5)do if q~=nil then local C=Character.HumanoidRootPart;local D=q.HumanoidRootPart;C.CFrame=D.CFrame*CFrame.new(0,0,-12)end end end)local E={}game:service("RunService").Stepped:Connect(function()if q~=nil and o==false then local s=q.HumanoidRootPart;z.P=50000;z.CFrame=CFrame.new(f.HumanoidRootPart.CFrame.p,s.CFrame.p)z.Parent=f.HumanoidRootPart;B.CameraType="Scriptable"local F=f.HumanoidRootPart.CFrame*CFrame.new(0,1,8)B.CFrame=B.CFrame:lerp(CFrame.new(F.p,s.CFrame.p),.3)spawn(function()local G=(s.Position-f.HumanoidRootPart.Position).magnitude;if G<3 then Combat()elseif G<80 then EnergyBlast()end end)local v=CreatePath(s)spawn(function()Evaluate(v)repeat wait()until u==true;u=false end)elseif q==nil and o==false then z.P=0;z.Parent=nil;z.CFrame=CFrame.new()FixCamera()end end)local H=e.Status;local I=H.Energy;local J=H.MaxEnergy;local K=J.Value-3;local L=1;local M=e.Stats;local N=M.Ki;local O=M.Agility;local P=M.Attack;function KiCharge()local Q=e;local R=Q.Status;local S=Q.Character.UpperTorso;local T=Q.Character.Humanoid;local d=game:GetService("ReplicatedStorage").Remotes.Training.Charge;d:InvokeServer(R,S,T)for x=1,K do wait()end;local d=game:GetService("ReplicatedStorage").Remotes.Training.ChargeFinish;d:FireServer()end;SSJ=false;SSJ2=false;SSJ3=false;SSJ4=false;SSJG=false;function GetForm()local U=17;return U end;L=GetForm()Request(L)while true do if o==true then break end;wait()if Enabled==true then for V,W in pairs(workspace:GetChildren())do if W:FindFirstChild("Humanoid")and W~=f then if W:FindFirstChild("HumanoidRootPart")and W.Humanoid.Health>0 then local s=W.HumanoidRootPart;local G=(s.Position-f.HumanoidRootPart.Position).magnitude;if G<125 and q==nil then q=W;W.Humanoid.Died:Connect(function()q=nil end)end end end end end;if f.Humanoid.Health<f.Humanoid.MaxHealth/2 then if InMode==false and o==false then InMode=true;Chat("...")L=GetForm()Request(L)Transform()spawn(function()Chat("HAAA!")end)spawn(function()if InMode==true then wait(math.random(30,120))InMode=false;Transform()end end)end end;if o==true then t:Destroy()end end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement