Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------
- -----SO BASICALLY I'M FBI-----
- ---------------------------------
- --This script is made by Subaru112.
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- hum.WalkSpeed = 30
- local remote = Instance.new("RemoteEvent", char)
- remote.Name = "ReplicationEvent"
- local client = NLS([==[
- local mouse = game:GetService("Players").LocalPlayer:GetMouse()
- local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
- spawn(function()
- while game:GetService("RunService").Heartbeat:Wait() do
- remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
- end
- end)
- game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
- if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
- remote:FireServer(1, input.KeyCode)
- end
- end)
- mouse.Button1Down:Connect(function()
- remote:FireServer(2)
- end)
- remote.OnClientEvent:Connect(function()
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position, Vector3.new(mouse.Hit.Position.X, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.Y, mouse.Hit.Position.Z))
- end)
- ]==], char)
- local RS = char.Torso["Right Shoulder"]
- local LS = char.Torso["Left Shoulder"]
- local RH = char.Torso["Right Hip"]
- local LH = char.Torso["Left Hip"]
- local rootj = char.HumanoidRootPart.RootJoint
- local throwbutton = false
- local throw = false
- local normalanim = true
- local attackd = false
- local animpose = "Idle"
- local timepos = 0
- local sine = 0
- local RSnor = RS.C0
- local LSnor = LS.C0
- local RHnor = RH.C0
- local LHnor = LH.C0
- local rootjnor = rootj.C0
- ---------------------------------
- --------------Set up-------------
- ---------------------------------
- local char = owner.Character
- local fbi = Instance.new("Sound",char.Torso)
- fbi.Volume = 1
- fbi.SoundId = "rbxassetid://2156386052"
- fbi.Name = "fbi"
- local can = false
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "Pants" or v.ClassName == "Shirt" or v.ClassName == "CharacterMesh" then
- v:Destroy()
- end
- end
- local sh = Instance.new("Shirt",char)
- sh.ShirtTemplate = "rbxassetid://118005490"
- sh.Name = "Shirt"
- local pa = Instance.new("Pants",char)
- pa.PantsTemplate = "rbxassetid://118005535"
- pa.Name = "Pants"
- local h = Instance.new("Hat")
- h.Name = "Mask"
- h.AttachmentPos = Vector3.new(0, 0.4, 0)
- local ha = Instance.new("Part",h)
- ha.BrickColor = BrickColor.new("Really black")
- ha.Name = "Handle"
- ha.Size = Vector3.new(1, 0.8, 1)
- local m = Instance.new("SpecialMesh",ha)
- m.MeshId = "http://www.roblox.com/asset/?id=1286427"
- m.Scale = Vector3.new(1.1, 1.1, 1.1)
- local h2 = Instance.new("Hat")
- h2.Name = "Helmet"
- h2.AttachmentPos = Vector3.new(0, -0.179, 0)
- local ha2 = Instance.new("Part",h2)
- ha2.Name = "Handle"
- ha2.Size = Vector3.new(2, 1, 1)
- local m2 = Instance.new("SpecialMesh",ha2)
- m2.Scale = Vector3.new(1.3, 1.35, 1.3)
- m2.MeshId = "http://www.roblox.com/asset/?id=25648271"
- m2.TextureId = "http://www.roblox.com/asset/?id=28664001"
- h.Parent = char
- h2.Parent = char
- function onTouched(fire)
- if not(fire.Name == "Base") then
- if can == true then
- local hum = fire.Parent:FindFirstChildOfClass("Humanoid")
- if hum then
- hum:Destroy()
- for i,v in pairs(fire.Parent:GetChildren()) do
- if v.ClassName == "MeshPart" or v.ClassName == "Part" then
- v.CanCollide = true
- v.Anchored = false
- v.Parent = game.Workspace
- v.Velocity = Vector3.new(0, 50, 0) + char.HumanoidRootPart.CFrame.LookVector * 50
- end
- end
- end
- char.Torso.fbi:Play()
- fire.CanCollide = true
- fire.Anchored = false
- fire.Velocity = Vector3.new(0, 50, 0) + char.HumanoidRootPart.CFrame.LookVector * 50
- if not(fire.Name == "Torso" or fire.Name == "UpperTorso") then
- fire:BreakJoints()
- end
- end
- end
- end
- char.Torso.Touched:connect(onTouched)
- ---------------------------------
- -------------Attacks-------------
- ---------------------------------
- remote.OnServerEvent:Connect(function(Player, number, key)
- if number == 1 and plr.Name == Player.Name and attackd == false then
- if key == Enum.KeyCode.Z then
- can = true
- wait(0.5)
- can = false
- end
- if key == Enum.KeyCode.X then
- hum.JumpPower = 70
- hum.Jump = true
- wait(0.001)
- hum.JumpPower = 50
- end
- if key == Enum.KeyCode.C then
- end
- elseif Player.Name == plr.Name and number == 2 and throw == true and throwbutton == true then
- throwbutton = false
- throw = false
- end
- end)
- ---------------------------------
- -----------Wrapping up-----------
- ---------------------------------
- while true do
- wait()
- if not(fbi.Parent == char.Torso) then
- local fbi = Instance.new("Sound",char.Torso)
- fbi.Volume = 1
- fbi.SoundId = "rbxassetid://2156386052"
- fbi.Name = "fbi"
- end
- end
- while game:GetService("RunService").Heartbeat:Wait() do
- if normalanim then
- sine = sine + 1
- end
- if crabrave.Parent == char.Torso then
- crabrave.SoundId = "rbxassetid://1609256184"
- crabrave.Playing = true
- crabrave.Volume = 1
- crabrave.Looped = true
- timepos = crabrave.TimePosition
- else
- crabrave = Instance.new("Sound", char.Torso)
- crabrave.TimePosition = timepos
- end
- if remote.Parent == char then
- remote.Name = "ReplicationEvent"
- else
- remote = Instance.new("RemoteEvent", char)
- end
- local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
- if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
- animpose = "Walking"
- elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
- animpose = "Jumping"
- elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
- animpose = "Falling"
- else
- animpose = "Idle"
- end
- if animpose == "Idle" and normalanim then
- elseif animpose == "Walking" and normalanim then
- elseif animpose == "Jumping" and normalanim then
- elseif animpose == "Falling" and normalanim then
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement