SHOW:
|
|
- or go back to the newest paste.
| 1 | 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 = {}
| |
| 2 | do | |
| 3 | script.Parent = owner.Character | |
| 4 | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
| |
| 5 | local function NewFakeEvent() | |
| 6 | local Bind = Instance.new("BindableEvent")
| |
| 7 | local Fake;Fake = {Connections = {},
| |
| 8 | fakeEvent=true; | |
| 9 | Connect=function(self,Func) | |
| 10 | Bind.Event:connect(Func) | |
| 11 | self.Connections[Bind] = true | |
| 12 | return setmetatable({Connected = true},{
| |
| 13 | __index = function (self,Index) | |
| 14 | if Index:lower() == "disconnect" then | |
| 15 | return function() Fake.Connections[Bind] = false;self.Connected = false end | |
| 16 | end | |
| 17 | return Fake[Index] | |
| 18 | end; | |
| 19 | __tostring = function() return "Connection" end; | |
| 20 | }) | |
| 21 | end} | |
| 22 | Fake.connect = Fake.Connect;return Fake; | |
| 23 | end | |
| 24 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
| |
| 25 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
| |
| 26 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
| |
| 27 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
| |
| 28 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
| 29 | local function TriggerEvent(self,Event,...) | |
| 30 | local Trigger = Mouse[Event] | |
| 31 | if Trigger and Trigger.fakeEvent and Trigger.Connections then | |
| 32 | for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end | |
| 33 | end | |
| 34 | end | |
| 35 | Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent | |
| 36 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
| 37 | if FiredBy.Name ~= owner.Name then return end | |
| 38 | if Input.MouseEvent then | |
| 39 | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit | |
| 40 | else | |
| 41 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
| 42 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end | |
| 43 | for _,Action in pairs(ContextActionService.Actions) do | |
| 44 | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end | |
| 45 | end | |
| 46 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
| 47 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
| 48 | end | |
| 49 | end) | |
| 50 | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService | |
| 51 | Event.Parent = NLS([[ | |
| 52 | local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
| |
| 53 | local Input = function(Input,gameProcessedEvent) | |
| 54 | if gameProcessedEvent then return end | |
| 55 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
| |
| 56 | end | |
| 57 | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) | |
| 58 | local Hit,Target | |
| 59 | while wait(1/30) do | |
| 60 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
| 61 | Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
| |
| 62 | end | |
| 63 | end | |
| 64 | ]],owner.Character) | |
| 65 | end | |
| 66 | RealGame = game;game = setmetatable({},{
| |
| 67 | __index = function (self,Index) | |
| 68 | local Sandbox = function (Thing) | |
| 69 | if Thing:IsA("Player") then
| |
| 70 | local RealPlayer = Thing | |
| 71 | return setmetatable({},{
| |
| 72 | __index = function (self,Index) | |
| 73 | local Type = type(RealPlayer[Index]) | |
| 74 | if Type == "function" then | |
| 75 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
| 76 | return function (self)return InternalData["Mouse"] end | |
| 77 | end | |
| 78 | return function (self,...)return RealPlayer[Index](RealPlayer,...) end | |
| 79 | end | |
| 80 | return RealPlayer[Index] | |
| 81 | end; | |
| 82 | __tostring = function(self) return RealPlayer.Name end | |
| 83 | }) | |
| 84 | end | |
| 85 | end | |
| 86 | if RealGame[Index] then | |
| 87 | local Type = type(RealGame[Index]) | |
| 88 | if Type == "function" then | |
| 89 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
| 90 | return function (self,Service) | |
| 91 | local FakeServices = {
| |
| 92 | ["players"] = function() | |
| 93 | return setmetatable({},{
| |
| 94 | __index = function (self2,Index2) | |
| 95 | local RealService = RealGame:GetService(Service) | |
| 96 | local Type2 = type(Index2) | |
| 97 | if Type2 == "function" then | |
| 98 | return function (self,...) return RealService[Index2](RealService,...)end | |
| 99 | else | |
| 100 | if Index2:lower() == "localplayer" then return Sandbox(owner) end | |
| 101 | return RealService[Index2] | |
| 102 | end | |
| 103 | end; | |
| 104 | __tostring = function(self) return RealGame:GetService(Service).Name end | |
| 105 | }) | |
| 106 | end; | |
| 107 | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; | |
| 108 | ["userinputservice"] = function() return InternalData["UserInputService"] end; | |
| 109 | ["runservice"] = function() | |
| 110 | return setmetatable({},{
| |
| 111 | __index = function(self2,Index2) | |
| 112 | local RealService = RealGame:GetService(Service) | |
| 113 | local Type2 = type(Index2) | |
| 114 | if Type2 == "function" then | |
| 115 | return function (self,...) return RealService[Index2](RealService,...) end | |
| 116 | else | |
| 117 | local RunServices = {
| |
| 118 | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
| |
| 119 | ["renderstepped"] = function() return RealService["Stepped"] end | |
| 120 | } | |
| 121 | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end | |
| 122 | return RealService[Index2] | |
| 123 | end | |
| 124 | end | |
| 125 | }) | |
| 126 | end | |
| 127 | } | |
| 128 | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end | |
| 129 | return RealGame:GetService(Service) | |
| 130 | end | |
| 131 | end | |
| 132 | return function (self,...) return RealGame[Index](RealGame,...) end | |
| 133 | else | |
| 134 | if game:GetService(Index) then return game:GetService(Index) end | |
| 135 | return RealGame[Index] | |
| 136 | end | |
| 137 | end | |
| 138 | return nil | |
| 139 | end | |
| 140 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
| |
| 141 | local Player = game:GetService("Players").LocalPlayer
| |
| 142 | local Character = Player.Character | |
| 143 | local Mouse = Player:GetMouse() | |
| 144 | --Mouse.TargetFilter = workspace | |
| 145 | ||
| 146 | local Head = Character:WaitForChild("Head")
| |
| 147 | local Torso = Character:WaitForChild("Torso")
| |
| 148 | local RootPart = Character:WaitForChild("HumanoidRootPart")
| |
| 149 | local Human = Character:WaitForChild("Humanoid")
| |
| 150 | ||
| 151 | Human.AutoRotate = false | |
| 152 | Human.JumpPower = 0 | |
| 153 | Human.WalkSpeed = 12 | |
| 154 | ||
| 155 | ----------------------------------------------------------------------------------------------------------------------- | |
| 156 | ||
| 157 | for _, Item in next, Character:GetChildren() do | |
| 158 | if Item:IsA("CharacterAppearance") then
| |
| 159 | Item:Destroy() | |
| 160 | end | |
| 161 | end | |
| 162 | ||
| 163 | local Pants = Character:FindFirstChild("Pants") or Instance.new("Pants")
| |
| 164 | Pants.PantsTemplate = "rbxassetid://69232474" | |
| 165 | Pants.Name = "Pants" | |
| 166 | Pants.Parent = Character | |
| 167 | ||
| 168 | local Shirt = Character:FindFirstChild("Shirt") or Instance.new("Shirt")
| |
| 169 | Shirt.ShirtTemplate = "rbxassetid://69232183" | |
| 170 | Shirt.Name = "Shirt" | |
| 171 | Shirt.Parent = Character | |
| 172 | ||
| 173 | local Face = Head:WaitForChild("face")
| |
| 174 | Face.Texture = "rbxassetid://112805849" | |
| 175 | ||
| 176 | local TShirt = Torso:FindFirstChild("roblox")
| |
| 177 | if TShirt then | |
| 178 | TShirt:Destroy() | |
| 179 | end | |
| 180 | ||
| 181 | --[[local BodyColors = Character:WaitForChild("Body Colors")
| |
| 182 | BodyColors.HeadColor = BrickColor.new("Light orange")
| |
| 183 | BodyColors.LeftArmColor = BrickColor.new("Light orange")
| |
| 184 | BodyColors.RightArmColor = BrickColor.new("Light orange")
| |
| 185 | BodyColors.TorsoColor = BrickColor.new("Light orange")--]]
| |
| 186 | ||
| 187 | spawn(function() wait(.5) | |
| 188 | Head.BrickColor = BrickColor.new("Light orange")
| |
| 189 | Torso.BrickColor = BrickColor.new("Light orange")
| |
| 190 | Character["Left Arm"].BrickColor = BrickColor.new("Light orange")
| |
| 191 | Character["Right Arm"].BrickColor = BrickColor.new("Light orange")
| |
| 192 | end) | |
| 193 | ||
| 194 | Character:WaitForChild("Animate"):Destroy()
| |
| 195 | ||
| 196 | local RJ = RootPart:WaitForChild("RootJoint")
| |
| 197 | RJ:Destroy() | |
| 198 | RJ = Instance.new("Weld", RootPart)
| |
| 199 | RJ.Part0 = RootPart | |
| 200 | RJ.Part1 = Torso | |
| 201 | ||
| 202 | local Neck = Instance.new("Weld", Torso)
| |
| 203 | Neck.Part0 = Torso | |
| 204 | Neck.Part1 = Character:WaitForChild("Head")
| |
| 205 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
| 206 | ||
| 207 | Torso:WaitForChild("Right Shoulder").Part1 = nil
| |
| 208 | local RS = Instance.new("Weld", Head)
| |
| 209 | RS.Part0 = Head | |
| 210 | RS.Part1 = Character:WaitForChild("Right Arm")
| |
| 211 | ||
| 212 | Torso:WaitForChild("Left Shoulder").Part1 = nil
| |
| 213 | local LS = Instance.new("Weld", Head)
| |
| 214 | LS.Part0 = Head | |
| 215 | LS.Part1 = Character:WaitForChild("Left Arm")
| |
| 216 | ||
| 217 | local LH = Torso:WaitForChild("Left Hip")
| |
| 218 | LH:Destroy() | |
| 219 | LH = Instance.new("Weld", Torso)
| |
| 220 | LH.Part0 = Torso | |
| 221 | LH.Part1 = Character:WaitForChild("Left Leg")
| |
| 222 | ||
| 223 | local RH = Torso:WaitForChild("Right Hip")
| |
| 224 | RH:Destroy() | |
| 225 | RH = Instance.new("Weld", Torso)
| |
| 226 | RH.Part0 = Torso | |
| 227 | RH.Part1 = Character:WaitForChild("Right Leg")
| |
| 228 | ||
| 229 | local GUN = Instance.new("Part", Character)
| |
| 230 | GUN.CanCollide = false | |
| 231 | GUN.Size = Vector3.new(1.549, 2.302, 3.814) | |
| 232 | GUN.Name = "Handle" | |
| 233 | GUN.Material = Enum.Material.SmoothPlastic | |
| 234 | ||
| 235 | local MS = Instance.new("SpecialMesh", GUN)
| |
| 236 | MS.MeshType = Enum.MeshType.FileMesh | |
| 237 | MS.MeshId = "rbxassetid://450812185" | |
| 238 | MS.TextureId = "rbxassetid://450812194" | |
| 239 | ||
| 240 | local GRIP = Instance.new("Weld", RS.Part1)
| |
| 241 | GRIP.Part0 = RS.Part1 | |
| 242 | GRIP.Part1 = GUN | |
| 243 | ||
| 244 | local SN = Instance.new("Sound", GUN)
| |
| 245 | SN.SoundId = "rbxassetid://341294387" | |
| 246 | SN.PlaybackSpeed = 0.9 | |
| 247 | SN.Looped = true | |
| 248 | SN.Volume = 0 | |
| 249 | SN:Play() | |
| 250 | ||
| 251 | local FL = Instance.new("Part", GUN)
| |
| 252 | FL.BrickColor = BrickColor.Yellow() | |
| 253 | FL.Transparency = 1 | |
| 254 | FL.Material = Enum.Material.SmoothPlastic | |
| 255 | FL.CanCollide = false | |
| 256 | FL.Size = Vector3.new(1, 3.38, 1) | |
| 257 | ||
| 258 | local MS2 = Instance.new("SpecialMesh", FL)
| |
| 259 | MS2.MeshType = Enum.MeshType.FileMesh | |
| 260 | MS2.MeshId = "rbxassetid://1323306" | |
| 261 | MS2.Scale = Vector3.new(0.35, 1.9, 0.35) | |
| 262 | ||
| 263 | local FLW = Instance.new("Weld", GUN)
| |
| 264 | FLW.Part0 = GUN | |
| 265 | FLW.Part1 = FL | |
| 266 | FLW.C0 = CFrame.new(0.293, 0.251, 3.221, 0, 0.028, 1, 1, 0, 0, 0, 1, -0.028) | |
| 267 | ||
| 268 | ----------------------------------------------------------------------------------------------------------------------- | |
| 269 | ||
| 270 | local STANCE = {
| |
| 271 | NK = CFrame.new(0, 1, 0, 0.747311652, 0, 0.664473772, 0, 1, 0, -0.664473772, 0, 0.747311652); | |
| 272 | RJ = CFrame.new(0, 0, 0, 0.747311592, 0, -0.664473712, 0, 1, 0, 0.664473712, 0, 0.747311592); | |
| 273 | LS = CFrame.new(0.474761963, -1.61745477, -1.20455933, -0.127145067, -0.88503027, -0.447834671, -0.836402416, 0.338357687, -0.431213528, 0.533165276, 0.319743276, -0.783262014); | |
| 274 | RS = CFrame.new(1.14480591, -1.47239065, 0.695491791, 0.972185493, -0.190045089, -0.136889026, 0.123703048, 0.912935674, -0.388903707, 0.198880106, 0.361152887, 0.911051929); | |
| 275 | GRIP = CFrame.new(-0.0976009369, -1.92251587, -1.31733322, -0.980839312, 0.117544398, -0.155363142, 0.158846945, 0.944226265, -0.288452089, 0.11279203, -0.307604104, -0.944805682); | |
| 276 | } | |
| 277 | ||
| 278 | LS.C0 = STANCE.LS | |
| 279 | RS.C0 = STANCE.RS | |
| 280 | RJ.C0 = STANCE.RJ | |
| 281 | GRIP.C0 = STANCE.GRIP | |
| 282 | ||
| 283 | local Down = false | |
| 284 | ||
| 285 | Mouse.Button1Down:Connect(function() | |
| 286 | Down = true | |
| 287 | end) | |
| 288 | ||
| 289 | Mouse.Button1Up:Connect(function() | |
| 290 | Down = false | |
| 291 | end) | |
| 292 | ||
| 293 | math.randomseed(os.time()) | |
| 294 | ||
| 295 | local function Taunt() | |
| 296 | local Taunts = {137542750, 130774824, 130776108, 679798995, 679798810}
| |
| 297 | local Sound = Instance.new("Sound", GUN)
| |
| 298 | local Id = Taunts[math.random(#Taunts)] | |
| 299 | Sound.TimePosition = Id == 130776108 and 4.2 or 0 | |
| 300 | Sound.SoundId = "rbxassetid://" .. Id | |
| 301 | Sound.Volume = 1 | |
| 302 | Sound.Ended:Connect(function() | |
| 303 | Sound:Destroy() | |
| 304 | end) | |
| 305 | Sound:Play() | |
| 306 | end | |
| 307 | ||
| 308 | Mouse.KeyDown:Connect(function(Key) | |
| 309 | if Key == string.char(32) then | |
| 310 | Taunt() | |
| 311 | end | |
| 312 | end) | |
| 313 | ||
| 314 | ||
| 315 | ||
| 316 | local function Shoot() | |
| 317 | local Bullet = Instance.new("Part")
| |
| 318 | Bullet.Size = Vector3.new(0.3, 0.3, 0.7) | |
| 319 | Bullet.Transparency = 1 | |
| 320 | Bullet.CanCollide = false | |
| 321 | ||
| 322 | local AntiGravity = Instance.new("BodyForce", Bullet)
| |
| 323 | AntiGravity.Force = Vector3.new(0, Bullet:GetMass() * workspace.Gravity, 0) | |
| 324 | ||
| 325 | local Start = (GUN.CFrame * CFrame.new(0.255, 0.251, 1.877)).p | |
| 326 | Bullet.CFrame = CFrame.new(Start, Mouse.Hit.p) | |
| 327 | Bullet.Velocity = Bullet.CFrame.lookVector * 300 | |
| 328 | ||
| 329 | Bullet.Touched:Connect(function(Hit) | |
| 330 | if Hit.Parent and Hit.Parent ~= Character and Hit.Parent:FindFirstChild("Humanoid") then
| |
| 331 | Hit.Parent.Humanoid:TakeDamage(5) | |
| 332 | Bullet:Destroy() | |
| 333 | end | |
| 334 | end) | |
| 335 | ||
| 336 | Bullet.Parent = workspace | |
| 337 | game.Debris:AddItem(Bullet, 3) | |
| 338 | end | |
| 339 | ||
| 340 | ||
| 341 | game:GetService("RunService"):BindToRenderStep("Invisible", Enum.RenderPriority.Character.Value - 1, function()
| |
| 342 | GUN.LocalTransparencyModifier = 0 | |
| 343 | FL.LocalTransparencyModifier = 0 | |
| 344 | LS.Part1.LocalTransparencyModifier = 0 | |
| 345 | RS.Part1.LocalTransparencyModifier = 0 | |
| 346 | end) | |
| 347 | ||
| 348 | local Heartbeat, Angle = game:GetService("RunService").Heartbeat
| |
| 349 | ||
| 350 | while Heartbeat:Wait() do | |
| 351 | local Angle = tick() * 8 | |
| 352 | ||
| 353 | -- Torso lean | |
| 354 | local VelocityForTilt = RootPart.Velocity * Vector3.new(1, 0, 1) / 150 | |
| 355 | local VectorForTilt = RootPart.CFrame:vectorToObjectSpace(VelocityForTilt) | |
| 356 | RJ.C0 = RJ.C0:Lerp(STANCE.RJ * CFrame.Angles(VectorForTilt.Z, VectorForTilt.X, -VectorForTilt.X), 0.1) | |
| 357 | ||
| 358 | -- Rotate to face camera | |
| 359 | local RootPosition = RootPart.Position | |
| 360 | local Direction = Mouse.Hit.p - RootPosition | |
| 361 | Direction = Vector3.new(Direction.X, 0, Direction.Z).unit | |
| 362 | local NewCFrame = CFrame.new(RootPosition, RootPosition + Direction) * CFrame.Angles(0, -0.02, 0) | |
| 363 | RootPart.CFrame = RootPart.CFrame:Lerp(NewCFrame, 0.1) | |
| 364 | ||
| 365 | -- Neck Angle | |
| 366 | local Hypotenuse = (Mouse.Hit.p - Head.Position).magnitude | |
| 367 | local Opposite = Mouse.Hit.p.y - Head.Position.y | |
| 368 | local Pitch = math.asin(Opposite / Hypotenuse) | |
| 369 | local NewNeckCFrame = STANCE.NK * CFrame.Angles(Pitch + 0.2, 0, 0) * CFrame.new(0, 0.5, 0) | |
| 370 | Neck.C0 = Neck.C0:Lerp(NewNeckCFrame, 0.1) | |
| 371 | ||
| 372 | -- Legs | |
| 373 | local FlatVelocity = (Torso.Velocity * Vector3.new(1, 0, 1)) | |
| 374 | if FlatVelocity.magnitude < 2 then | |
| 375 | LH.C0 = LH.C0:Lerp(CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.sin(tick() * 0.5) / 17, 0, -0.02 + math.sin(tick() * 0.4) / 19) * CFrame.new(0, -1, 0), 0.2) | |
| 376 | RH.C0 = RH.C0:Lerp(CFrame.new(0.5, -1, 0) * CFrame.Angles(math.sin(-tick() * 0.5) / 18, 0, 0.02 + math.sin(-tick() * 0.35) / 20) * CFrame.new(0, -1, 0), 0.2) | |
| 377 | else | |
| 378 | local Look = (Torso.CFrame.lookVector * Vector3.new(1, 0, 1)).unit | |
| 379 | local Move = FlatVelocity.unit | |
| 380 | local OffAngle = (Look:Cross(Move).Y > 0 and 1 or -1) * math.acos(1 - (Look - Move).magnitude ^ 2 / 2) | |
| 381 | OffAngle = math.max(-math.pi, math.min(math.pi, OffAngle)) | |
| 382 | LH.C0 = LH.C0:Lerp(CFrame.new(-0.5, 0, 0) * CFrame.Angles(0, OffAngle, 0) | |
| 383 | * CFrame.new(0, -math.max(0, math.cos(Angle * 2) / 5) + math.max(0, math.cos(Angle + math.pi) / 2.5) - 2, math.sin(-Angle + math.pi) / 1.8 + 0.15) | |
| 384 | * CFrame.Angles(math.sin(-Angle) / 1.8 - 0.2, 0, 0), 0.2) | |
| 385 | RH.C0 = RH.C0:Lerp(CFrame.new(0.5, 0, 0) * CFrame.Angles(0, OffAngle, 0) | |
| 386 | * CFrame.new(0, -math.max(0, math.cos(Angle * 2) / 5) + math.max(0, math.cos(Angle) / 2.5) - 2, math.sin(-Angle) / 1.8 + 0.15) | |
| 387 | * CFrame.Angles(math.sin(Angle) / 1.8 - 0.2, 0, 0), 0.2) | |
| 388 | end | |
| 389 | ||
| 390 | -- Shooting | |
| 391 | if Down then | |
| 392 | SN.Volume = SN.Volume + (1.5 - SN.Volume) * 0.3 | |
| 393 | FL.Transparency = FL.Transparency + (0.6 - FL.Transparency) * 0.2 | |
| 394 | FLW.C0 = FLW.C0 * CFrame.Angles(0, 0.2, 0) | |
| 395 | Shoot() | |
| 396 | else | |
| 397 | SN.Volume = SN.Volume + (0 - SN.Volume) * 0.15 | |
| 398 | FL.Transparency = FL.Transparency + (1 - FL.Transparency) * 0.2 | |
| 399 | end | |
| 400 | end |