SHOW:
|
|
- or go back to the newest paste.
| 1 | --------------------------------- | |
| 2 | -----SO BASICALLY I'M FBI----- | |
| 3 | --------------------------------- | |
| 4 | ||
| 5 | --This script is made by Subaru112. | |
| 6 | ||
| 7 | local plr = owner | |
| 8 | local char = plr.Character | |
| 9 | local hum = char:FindFirstChildOfClass("Humanoid")
| |
| 10 | hum.WalkSpeed = 30 | |
| 11 | ||
| 12 | local remote = Instance.new("RemoteEvent", char)
| |
| 13 | remote.Name = "ReplicationEvent" | |
| 14 | local client = NLS([==[ | |
| 15 | local mouse = game:GetService("Players").LocalPlayer:GetMouse()
| |
| 16 | local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
| |
| 17 | spawn(function() | |
| 18 | while game:GetService("RunService").Heartbeat:Wait() do
| |
| 19 | remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
| |
| 20 | end | |
| 21 | end) | |
| 22 | game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
| |
| 23 | if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then | |
| 24 | remote:FireServer(1, input.KeyCode) | |
| 25 | end | |
| 26 | end) | |
| 27 | mouse.Button1Down:Connect(function() | |
| 28 | remote:FireServer(2) | |
| 29 | end) | |
| 30 | remote.OnClientEvent:Connect(function() | |
| 31 | 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))
| |
| 32 | end) | |
| 33 | ]==], char) | |
| 34 | local RS = char.Torso["Right Shoulder"] | |
| 35 | local LS = char.Torso["Left Shoulder"] | |
| 36 | local RH = char.Torso["Right Hip"] | |
| 37 | local LH = char.Torso["Left Hip"] | |
| 38 | local rootj = char.HumanoidRootPart.RootJoint | |
| 39 | local throwbutton = false | |
| 40 | local throw = false | |
| 41 | local normalanim = true | |
| 42 | local attackd = false | |
| 43 | local animpose = "Idle" | |
| 44 | local timepos = 0 | |
| 45 | local sine = 0 | |
| 46 | local RSnor = RS.C0 | |
| 47 | local LSnor = LS.C0 | |
| 48 | local RHnor = RH.C0 | |
| 49 | local LHnor = LH.C0 | |
| 50 | local rootjnor = rootj.C0 | |
| 51 | ||
| 52 | --------------------------------- | |
| 53 | --------------Set up------------- | |
| 54 | --------------------------------- | |
| 55 | ||
| 56 | local char = owner.Character | |
| 57 | local fbi = Instance.new("Sound",char.Torso)
| |
| 58 | fbi.Volume = 1 | |
| 59 | fbi.SoundId = "rbxassetid://2156386052" | |
| 60 | fbi.Name = "fbi" | |
| 61 | local can = false | |
| 62 | ||
| 63 | for i,v in pairs(char:GetChildren()) do | |
| 64 | if v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "Pants" or v.ClassName == "Shirt" or v.ClassName == "CharacterMesh" then | |
| 65 | v:Destroy() | |
| 66 | end | |
| 67 | end | |
| 68 | ||
| 69 | local sh = Instance.new("Shirt",char)
| |
| 70 | sh.ShirtTemplate = "rbxassetid://118005490" | |
| 71 | sh.Name = "Shirt" | |
| 72 | ||
| 73 | local pa = Instance.new("Pants",char)
| |
| 74 | pa.PantsTemplate = "rbxassetid://118005535" | |
| 75 | pa.Name = "Pants" | |
| 76 | ||
| 77 | local h = Instance.new("Hat")
| |
| 78 | h.Name = "Mask" | |
| 79 | h.AttachmentPos = Vector3.new(0, 0.4, 0) | |
| 80 | local ha = Instance.new("Part",h)
| |
| 81 | ha.BrickColor = BrickColor.new("Really black")
| |
| 82 | ha.Name = "Handle" | |
| 83 | ha.Size = Vector3.new(1, 0.8, 1) | |
| 84 | local m = Instance.new("SpecialMesh",ha)
| |
| 85 | m.MeshId = "http://www.roblox.com/asset/?id=1286427" | |
| 86 | m.Scale = Vector3.new(1.1, 1.1, 1.1) | |
| 87 | ||
| 88 | local h2 = Instance.new("Hat")
| |
| 89 | h2.Name = "Helmet" | |
| 90 | h2.AttachmentPos = Vector3.new(0, -0.179, 0) | |
| 91 | local ha2 = Instance.new("Part",h2)
| |
| 92 | ha2.Name = "Handle" | |
| 93 | ha2.Size = Vector3.new(2, 1, 1) | |
| 94 | local m2 = Instance.new("SpecialMesh",ha2)
| |
| 95 | m2.Scale = Vector3.new(1.3, 1.35, 1.3) | |
| 96 | m2.MeshId = "http://www.roblox.com/asset/?id=25648271" | |
| 97 | m2.TextureId = "http://www.roblox.com/asset/?id=28664001" | |
| 98 | ||
| 99 | h.Parent = char | |
| 100 | h2.Parent = char | |
| 101 | ||
| 102 | function onTouched(fire) | |
| 103 | if not(fire.Name == "Base") then | |
| 104 | ||
| 105 | if can == true then | |
| 106 | ||
| 107 | local hum = fire.Parent:FindFirstChildOfClass("Humanoid")
| |
| 108 | if hum then | |
| 109 | hum:Destroy() | |
| 110 | for i,v in pairs(fire.Parent:GetChildren()) do | |
| 111 | if v.ClassName == "MeshPart" or v.ClassName == "Part" then | |
| 112 | v.CanCollide = true | |
| 113 | v.Anchored = false | |
| 114 | v.Parent = game.Workspace | |
| 115 | v.Velocity = Vector3.new(0, 50, 0) + char.HumanoidRootPart.CFrame.LookVector * 50 | |
| 116 | end | |
| 117 | end | |
| 118 | end | |
| 119 | char.Torso.fbi:Play() | |
| 120 | fire.CanCollide = true | |
| 121 | fire.Anchored = false | |
| 122 | fire.Velocity = Vector3.new(0, 50, 0) + char.HumanoidRootPart.CFrame.LookVector * 50 | |
| 123 | ||
| 124 | ||
| 125 | if not(fire.Name == "Torso" or fire.Name == "UpperTorso") then | |
| 126 | fire:BreakJoints() | |
| 127 | ||
| 128 | end | |
| 129 | ||
| 130 | end | |
| 131 | end | |
| 132 | end | |
| 133 | char.Torso.Touched:connect(onTouched) | |
| 134 | ||
| 135 | --------------------------------- | |
| 136 | -------------Attacks------------- | |
| 137 | --------------------------------- | |
| 138 | ||
| 139 | remote.OnServerEvent:Connect(function(Player, number, key) | |
| 140 | if number == 1 and plr.Name == Player.Name and attackd == false then | |
| 141 | if key == Enum.KeyCode.Z then | |
| 142 | can = true | |
| 143 | wait(0.5) | |
| 144 | can = false | |
| 145 | end | |
| 146 | if key == Enum.KeyCode.X then | |
| 147 | hum.JumpPower = 70 | |
| 148 | hum.Jump = true | |
| 149 | wait(0.001) | |
| 150 | hum.JumpPower = 50 | |
| 151 | end | |
| 152 | if key == Enum.KeyCode.C then | |
| 153 | ||
| 154 | end | |
| 155 | elseif Player.Name == plr.Name and number == 2 and throw == true and throwbutton == true then | |
| 156 | throwbutton = false | |
| 157 | throw = false | |
| 158 | end | |
| 159 | end) | |
| 160 | ||
| 161 | --------------------------------- | |
| 162 | -----------Wrapping up----------- | |
| 163 | --------------------------------- | |
| 164 | ||
| 165 | while true do | |
| 166 | wait() | |
| 167 | if not(fbi.Parent == char.Torso) then | |
| 168 | local fbi = Instance.new("Sound",char.Torso)
| |
| 169 | fbi.Volume = 1 | |
| 170 | fbi.SoundId = "rbxassetid://2156386052" | |
| 171 | fbi.Name = "fbi" | |
| 172 | end | |
| 173 | end | |
| 174 | ||
| 175 | while game:GetService("RunService").Heartbeat:Wait() do
| |
| 176 | if normalanim then | |
| 177 | sine = sine + 1 | |
| 178 | end | |
| 179 | if crabrave.Parent == char.Torso then | |
| 180 | crabrave.SoundId = "rbxassetid://1609256184" | |
| 181 | crabrave.Playing = true | |
| 182 | crabrave.Volume = 1 | |
| 183 | crabrave.Looped = true | |
| 184 | timepos = crabrave.TimePosition | |
| 185 | else | |
| 186 | crabrave = Instance.new("Sound", char.Torso)
| |
| 187 | crabrave.TimePosition = timepos | |
| 188 | end | |
| 189 | if remote.Parent == char then | |
| 190 | remote.Name = "ReplicationEvent" | |
| 191 | else | |
| 192 | remote = Instance.new("RemoteEvent", char)
| |
| 193 | end | |
| 194 | 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) | |
| 195 | if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then | |
| 196 | animpose = "Walking" | |
| 197 | elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then | |
| 198 | animpose = "Jumping" | |
| 199 | elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then | |
| 200 | animpose = "Falling" | |
| 201 | else | |
| 202 | animpose = "Idle" | |
| 203 | end | |
| 204 | if animpose == "Idle" and normalanim then | |
| 205 | ||
| 206 | elseif animpose == "Walking" and normalanim then | |
| 207 | ||
| 208 | elseif animpose == "Jumping" and normalanim then | |
| 209 | ||
| 210 | elseif animpose == "Falling" and normalanim then | |
| 211 | ||
| 212 | end | |
| 213 | end |