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 | - | peron = game.Players["Cobalt1164"] |
| 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 | ||
| 142 | if script.ClassName~="LocalScript" then wait(math.huge) end | |
| 143 | --[[ solve it]] | |
| 144 | peron = game.Players["sanicisdabomb"] | |
| 145 | Player=peron | |
| 146 | player=peron | |
| 147 | person=peron | |
| 148 | Person=peron | |
| 149 | script.Parent=peron | |
| 150 | FF=false | |
| 151 | FF2=Instance.new("ForceField")
| |
| 152 | --if peron.Backpack:findFirstChild("Chair") == nil then
| |
| 153 | -- local h = Instance.new("HopperBin")
| |
| 154 | -- h.Name = "Chair" h.Parent = peron.Backpack | |
| 155 | -- script.Parent = h | |
| 156 | -- p = Instance.new("IntValue")
| |
| 157 | -- p.Name = "Damage" p.Parent = h | |
| 158 | -- p.Value = 75 | |
| 159 | -- wait(math.huge) | |
| 160 | -- end | |
| 161 | range = 50 | |
| 162 | speed = 15 | |
| 163 | function chair() | |
| 164 | local h = Instance.new("HopperBin")
| |
| 165 | FIRE=false | |
| 166 | h.Name = "Chair" h.Parent = peron.Backpack | |
| 167 | p = Instance.new("IntValue")
| |
| 168 | p.Name = "Damage" p.Parent = h | |
| 169 | p.Value = 100 | |
| 170 | wait(1) | |
| 171 | local bin = peron.Backpack.Chair | |
| 172 | me1 = peron me = peron.Character | |
| 173 | distance = 3/2 | |
| 174 | follow = false | |
| 175 | damage = bin.Damage | |
| 176 | p = Instance.new("IntValue")
| |
| 177 | p.Name = "Safe" p.Parent = me | |
| 178 | if me:findFirstChild("part1") == nil then
| |
| 179 | local part1 = Instance.new("Seat")
| |
| 180 | part1.BrickColor = BrickColor.new("Black")
| |
| 181 | part1.Transparency = 0 part1.TopSurface = 0 part1.BottomSurface = 0 part1.Reflectance = math.huge part1.Locked = true part1.Size = Vector3.new(1,1,1) part1.Anchored = false part1.Shape = 0 part1.CanCollide = false part1.Name = "part1" | |
| 182 | local mesh = Instance.new("SpecialMesh") mesh.Parent = part1 part1.Reflectance=math.huge mesh.Scale = Vector3.new(2,1.75,2) mesh.MeshType = "Sphere"
| |
| 183 | bp = Instance.new("BodyPosition") bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
| |
| 184 | bp.Parent = part1 | |
| 185 | bp.position=peron.Character.Torso.Position | |
| 186 | part1.CFrame=peron.Character.Torso.CFrame | |
| 187 | local bg = Instance.new("BodyGyro") bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge) bg.Parent = part1
| |
| 188 | main = part1:Clone() | |
| 189 | local part2 = Instance.new("Part") part2.BrickColor = BrickColor.new("White") part2.Transparency = 0 part2.TopSurface = 0 part2.BottomSurface = 0 part2.Locked = true part2.Size = Vector3.new(1,1,1) part2.Anchored = false part2.Shape = 0 part2.CanCollide = false part2.Name = "part2"
| |
| 190 | local mesh = Instance.new("BlockMesh") mesh.Parent = part2 mesh.Scale = Vector3.new(3,0.75,3)
| |
| 191 | local part3 = Instance.new("Part") part3.BrickColor = BrickColor.new("White") part3.Transparency = 0 part3.TopSurface = 0 part3.BottomSurface = 0 part3.Locked = true part3.Size = Vector3.new(1,0.5,1) part3.Anchored = false part3.Shape = 0 part3.CanCollide = false part3.Name = "part3"
| |
| 192 | local mesh = Instance.new("CylinderMesh") mesh.Parent = part3 mesh.Scale = Vector3.new(2.5,0.5,2.5)
| |
| 193 | local part4 = Instance.new("Part") part4.BrickColor = BrickColor.new("White") part4.Transparency = 0 part4.TopSurface = 0 part4.BottomSurface = 0 part4.Locked = true part4.Size = Vector3.new(1,1,1) part4.Anchored = false part4.Shape = 0 part4.CanCollide = false part4.Name = "part4"
| |
| 194 | local mesh = Instance.new("BlockMesh") mesh.Parent = part4 mesh.Scale = Vector3.new(3,3,0.5)
| |
| 195 | local part5 = Instance.new("Part") part5.BrickColor = BrickColor.new("White") part5.Transparency = 0 part5.TopSurface = 0 part5.BottomSurface = 0 part5.Locked = true part5.Size = Vector3.new(1,0.5,1) part5.Anchored = false part5.Shape = 0 part5.CanCollide = false part5.Name = "part5"
| |
| 196 | local mesh = Instance.new("CylinderMesh") mesh.Parent = part5 mesh.Scale = Vector3.new(1.5,0.5,1.5)
| |
| 197 | local part6 = Instance.new("Part") part6.BrickColor = BrickColor.new("Black") part6.Transparency = 0 part6.TopSurface = 0 part6.BottomSurface = 0 part6.Locked = true part6.Size = Vector3.new(1,1,1) part6.Anchored = false part6.Shape = 0 part6.CanCollide = false part6.Name = "part6"
| |
| 198 | local mesh1 = Instance.new("SpecialMesh") mesh1.Parent = part6 part6.Reflectance=math.huge mesh1.Scale = Vector3.new(1,1,1) mesh1.MeshType = "Sphere"
| |
| 199 | local part7 = Instance.new("Part") part7.BrickColor = BrickColor.new("White") part7.Transparency = 0 part7.TopSurface = 0 part7.BottomSurface = 0 part7.Locked = true part7.Size = Vector3.new(1,1,1) part7.Anchored = false part7.Shape = 0 part7.CanCollide = false part7.Name = "part7"
| |
| 200 | local mesh = Instance.new("BlockMesh") mesh.Parent = part7 mesh.Scale = Vector3.new(1,0.25,1)
| |
| 201 | local part8 = Instance.new("Part") part8.BrickColor = BrickColor.new("White") part8.Transparency = 0 part8.TopSurface = 0 part8.BottomSurface = 0 part8.Locked = true part8.Size = Vector3.new(1,1,1) part8.Anchored = false part8.Shape = 0 part8.CanCollide = false part8.Name = "part8"
| |
| 202 | local mesh = Instance.new("BlockMesh") mesh.Parent = part8 mesh.Scale = Vector3.new(1,0.25,1)
| |
| 203 | local part9 = Instance.new("Part") part9.BrickColor = BrickColor.new("White") part9.Transparency = 0 part9.TopSurface = 0 part9.BottomSurface = 0 part9.Locked = true part9.Size = Vector3.new(1,1,1) part9.Anchored = false part9.Shape = 0 part9.CanCollide = false part9.Name = "part9"
| |
| 204 | local mesh = Instance.new("BlockMesh") mesh.Parent = part9 mesh.Scale = Vector3.new(1,0.25,3)
| |
| 205 | local part10 = Instance.new("Part") part10.BrickColor = BrickColor.new("White") part10.Transparency = 0 part10.TopSurface = 0 part10.BottomSurface = 0 part10.Locked = true part10.Size = Vector3.new(1,1,1) part10.Anchored = false part10.Shape = 0 part10.CanCollide = false part10.Name = "part10"
| |
| 206 | local mesh = Instance.new("BlockMesh") mesh.Parent = part10 mesh.Scale = Vector3.new(1,0.25,3)
| |
| 207 | part11 = Instance.new("Part") part11.BrickColor = BrickColor.new("Black") part11.Transparency = 0 part11.TopSurface = 0 part11.BottomSurface = 0 part11.Locked = true part11.Size = Vector3.new(1,1,1) part11.Anchored = false part11.Shape = 0 part11.CanCollide = false part11.Name = "part11"
| |
| 208 | local mesh = Instance.new("BlockMesh") mesh.Parent = part11 mesh.Scale = Vector3.new(0.2,0.2,0.5)
| |
| 209 | part12 = Instance.new("Part") part12.BrickColor = BrickColor.new("Black") part12.Transparency = 0 part12.TopSurface = 0 part12.BottomSurface = 0 part12.Locked = true part12.Size = Vector3.new(1,1,1) part12.Anchored = false part12.Shape = 0 part12.CanCollide = false part12.Name = "part12"
| |
| 210 | local mesh = Instance.new("BlockMesh") mesh.Parent = part12 mesh.Scale = Vector3.new(0.2,0.2,0.5) main.Parent = me part2.Parent = me part3.Parent = me part4.Parent = me part5.Parent = me part6.Parent = me part7.Parent = me part8.Parent = me part9.Parent = me part10.Parent = me part11.Parent = me part12.Parent = me
| |
| 211 | ||
| 212 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part2 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, -0.5, 0)
| |
| 213 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part3 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0, 0)
| |
| 214 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part4 weld.C1 = CFrame.fromEulerAnglesXYZ(-0.1, 0, 0) * CFrame.new(0, -2, -0.75)
| |
| 215 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part5 weld.C1 = CFrame.fromEulerAnglesXYZ(-4.815, 0, 0) * CFrame.new(0, -2, -1)
| |
| 216 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part6 weld.C1 = CFrame.fromEulerAnglesXYZ(-4.815, 0, 0) * CFrame.new(0, -2, -1.25)
| |
| 217 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part7 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(1.75, -0.5, 0)
| |
| 218 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part8 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(-1.75, -0.5, 0)
| |
| 219 | ||
| 220 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part9 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(-1.5, -1.875, 0)
| |
| 221 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part10 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(1.5, -1.875, 0)
| |
| 222 | ||
| 223 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part11 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(2, -0.5, 0.75)
| |
| 224 | local weld = Instance.new("Weld") weld.Parent = main weld.Part0 = main weld.Part1 = part12 weld.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(-2, -0.5, 0.75)
| |
| 225 | end | |
| 226 | beam=Instance.new("Part")
| |
| 227 | beam1=Instance.new("Part")
| |
| 228 | function wire(pos1,pos2,ref) | |
| 229 | local P = beam | |
| 230 | local P2 = pos1 | |
| 231 | local P1 = pos2 | |
| 232 | P.Parent=peron | |
| 233 | P.Name = "Beam" | |
| 234 | local Place0 = CFrame.new(P2.x,P2.y,P2.z) | |
| 235 | P.formFactor = 0 | |
| 236 | --P.Size = Vector3.new(1,1,(P1 - P2).magnitude) | |
| 237 | P.Size=Vector3.new(0.1,0.1,0.1) | |
| 238 | P.CFrame = CFrame.new((P1 + P2)/2,Place0.p) | |
| 239 | P.Parent = player.Character | |
| 240 | P.BrickColor = BrickColor.new("Bright blue")
| |
| 241 | P.Transparency = 0.5 | |
| 242 | P.Reflectance = ref | |
| 243 | P.Anchored = true | |
| 244 | P.CanCollide = false | |
| 245 | P.TopSurface = "Smooth" | |
| 246 | P.BottomSurface = "Smooth" | |
| 247 | local m = Instance.new("SpecialMesh")
| |
| 248 | m.Parent = P | |
| 249 | m.MeshType = "Brick" | |
| 250 | m.Scale = Vector3.new(.1,.1,(P1 - P2).magnitude) | |
| 251 | return P | |
| 252 | end | |
| 253 | function wire2(pos1,pos2,ref) | |
| 254 | local P = beam1 | |
| 255 | local P2 = pos1 | |
| 256 | local P1 = pos2 | |
| 257 | P.Name = "Beam" | |
| 258 | local Place0 = CFrame.new(P2.x,P2.y,P2.z) | |
| 259 | P.formFactor = 0 | |
| 260 | P.Parent=peron | |
| 261 | --P.Size = Vector3.new(1,1,(P1 - P2).magnitude) | |
| 262 | P.Size=Vector3.new(0.1,0.1,0.1) | |
| 263 | P.CFrame = CFrame.new((P1 + P2)/2,Place0.p) | |
| 264 | P.Parent = player.Character | |
| 265 | P.BrickColor = BrickColor.new("Bright blue")
| |
| 266 | P.Transparency = 0.5 | |
| 267 | P.Reflectance = ref | |
| 268 | P.Anchored = true | |
| 269 | P.CanCollide = false | |
| 270 | P.TopSurface = "Smooth" | |
| 271 | P.BottomSurface = "Smooth" | |
| 272 | local m = Instance.new("SpecialMesh")
| |
| 273 | m.Parent = P | |
| 274 | m.MeshType = "Brick" | |
| 275 | m.Scale = Vector3.new(.1,.1,(P1 - P2).magnitude) | |
| 276 | return P | |
| 277 | end | |
| 278 | function Balefire(pos, obj) | |
| 279 | hum = obj.Parent:findFirstChild("Humanoid")
| |
| 280 | if hum ~= nil then | |
| 281 | local P = Instance.new("Part")
| |
| 282 | P.Name = "Laser" | |
| 283 | local Place0 = me.part12.CFrame | |
| 284 | P.formFactor = 0 | |
| 285 | P.Parent = game.Workspace | |
| 286 | P.Color = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1)) | |
| 287 | P.Transparency = 0.25 P.Reflectance = 0.25 P.Anchored = true P.formFactor = "Plate" P.CanCollide = false | |
| 288 | pl = Instance.new("BlockMesh")
| |
| 289 | pl.Scale = Vector3.new(0.1,0.2,1) | |
| 290 | pl.Parent = P | |
| 291 | P.Size = Vector3.new(1,0.4,(Place0.p - pos).magnitude) | |
| 292 | P.CFrame = CFrame.new((Place0.p + pos)/2, Place0.p) | |
| 293 | if hum.Health <= 100 then | |
| 294 | hum.Health = hum.Health - damage.Value else hum.Health = 0 end wait(0.01) P:Remove() end | |
| 295 | end | |
| 296 | function Balefire1(pos, obj) | |
| 297 | hum = obj.Parent:findFirstChild("Humanoid")
| |
| 298 | if hum ~= nil then | |
| 299 | local P = Instance.new("Part") P.Name = "Laser"
| |
| 300 | local Place0 = me.part11.CFrame P.formFactor = 0 P.Parent = game.Workspace | |
| 301 | P.Color = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1)) | |
| 302 | P.Transparency = 0.25 P.Reflectance = 0.25 P.Anchored = true P.formFactor = "Plate" P.CanCollide = false | |
| 303 | pl = Instance.new("BlockMesh") pl.Scale = Vector3.new(0.1,0.2,1) pl.Parent = P
| |
| 304 | P.Size = Vector3.new(1,0.4,(Place0.p - pos).magnitude) P.CFrame = CFrame.new((Place0.p + pos)/2, Place0.p) | |
| 305 | if hum.Health <= 100 then hum.Health = hum.Health - damage.Value else hum.Health = 0 end wait(0.01) P:Remove() end | |
| 306 | end | |
| 307 | function findNearestTorso(pos) | |
| 308 | local list = game.Workspace:getChildren() | |
| 309 | local torso = nil | |
| 310 | local dist = range | |
| 311 | local temp = nil | |
| 312 | local human = nil | |
| 313 | local temp2 = nil | |
| 314 | for x = 1, #list do | |
| 315 | temp2 = list[x] | |
| 316 | local safe = temp2:findFirstChild("Safe")
| |
| 317 | if (temp2.className == "Model") and (safe == nil) and damage.Value > 0 then | |
| 318 | temp = temp2:findFirstChild("Torso") human = temp2:findFirstChild("Humanoid")
| |
| 319 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
| 320 | if (temp.Position - pos).magnitude < dist then | |
| 321 | torso = temp dist = (temp.Position - pos).magnitude | |
| 322 | end | |
| 323 | end | |
| 324 | end | |
| 325 | if (temp2.className == "Model") and damage.Value <= 0 then | |
| 326 | temp = temp2:findFirstChild("Torso")
| |
| 327 | human = temp2:findFirstChild("Humanoid")
| |
| 328 | if (temp ~= nil) and (human ~= nil) and (human.Health < 100) then | |
| 329 | if (temp.Position - pos).magnitude < dist then | |
| 330 | torso = temp | |
| 331 | dist = (temp.Position - pos).magnitude | |
| 332 | end | |
| 333 | end | |
| 334 | end | |
| 335 | end | |
| 336 | return torso | |
| 337 | end | |
| 338 | function onButton1Down(mouse) | |
| 339 | local player = peron | |
| 340 | main = me.part1 | |
| 341 | main.Anchored = false | |
| 342 | me1 = peron | |
| 343 | follow = true | |
| 344 | while follow == true do | |
| 345 | distance = 3/2 mousehit = mouse.Hit.p if (main.BodyPosition.position - mousehit).magnitude >speed then | |
| 346 | main_mousehit = (main.BodyPosition.position - mousehit).unit*speed | |
| 347 | else | |
| 348 | main_mousehit = (main.BodyPosition.position - mousehit).unit*1 | |
| 349 | end | |
| 350 | start1 = main.BodyPosition.position-main_mousehit | |
| 351 | main.BodyPosition.position = Vector3.new(start1.x, start1.y, start1.z) | |
| 352 | local dir = (mousehit - main.Position).unit | |
| 353 | local spawnPos = main.Position | |
| 354 | local pos = spawnPos + (dir * 1) | |
| 355 | local dir = (pos - main.Position) | |
| 356 | local Angle = ((mouse.ViewSizeX/2)-mouse.X)/100 | |
| 357 | if math.abs(Angle) > 1 then if Angle > 0 then Angle = Angle - 1 else Angle = Angle + 1 end | |
| 358 | ||
| 359 | Angle = Angle * math.abs(26) / 70 main.BodyGyro.cframe = CFrame.new(pos, pos + dir) * CFrame.fromEulerAnglesXYZ(0, 0, Angle) else main.BodyGyro.cframe = CFrame.new(pos, pos + dir) end | |
| 360 | wait() end end | |
| 361 | function onButton1Up(mouse) | |
| 362 | main = me.part1 | |
| 363 | main.Anchored = false | |
| 364 | follow = false | |
| 365 | end | |
| 366 | local msg = Instance.new("Hint")
| |
| 367 | function say(tehmessage) | |
| 368 | msg.Parent = me1 | |
| 369 | msg.Text = tehmessage | |
| 370 | wait(2) | |
| 371 | msg.Parent = nil | |
| 372 | end | |
| 373 | ||
| 374 | function onKeyUp(key,mouse) | |
| 375 | if (key=="e") then FIRE=false end | |
| 376 | end | |
| 377 | ||
| 378 | function onKeyDown(key,mouse) | |
| 379 | if (key~=nil) then | |
| 380 | if (key=="f") then speed = speed+1 say("speed: "..speed)
| |
| 381 | elseif (key=="c") then | |
| 382 | speed = speed-1 say("speed: "..speed)
| |
| 383 | elseif (key=="g") then | |
| 384 | range = range+1 say("range: "..range)
| |
| 385 | elseif (key=="x") then | |
| 386 | FF3=Instance.new("ForceField",peron.Character)
| |
| 387 | main.Anchored=true | |
| 388 | X=Instance.new("Explosion")
| |
| 389 | X.Parent=workspace | |
| 390 | X.BlastPressure=math.huge | |
| 391 | X.BlastRadius=10 | |
| 392 | X.Position=peron.Character.Torso.Position | |
| 393 | while X.Parent do wait() end | |
| 394 | wait() | |
| 395 | FF3:remove() | |
| 396 | main.Anchored=false | |
| 397 | elseif (key=="v") then | |
| 398 | if range == 0 then return end | |
| 399 | range = range-1 say("range: "..range)
| |
| 400 | elseif (key=="h") then | |
| 401 | damage.Value = damage.Value+1 say("damage: "..damage.Value)
| |
| 402 | elseif (key=="m") then | |
| 403 | main.CFrame=peron.Character.Torso.CFrame | |
| 404 | main.BodyPosition.position=peron.Character.Torso.Position | |
| 405 | elseif (key=="n") then | |
| 406 | FF=not FF | |
| 407 | if FF then FF2.Parent=peron.Character else FF2.Parent=nil end | |
| 408 | elseif (key=="b") then | |
| 409 | damage.Value = damage.Value-1 say("damage: "..damage.Value)
| |
| 410 | elseif (key=="r") then | |
| 411 | speed = 2 range = 0 damage.Value = 0 say("speed: "..speed) say("damage: "..damage.Value) say("range: "..range)
| |
| 412 | elseif (key=="e") then | |
| 413 | FIRE=true | |
| 414 | while FIRE do | |
| 415 | wire(part11.Position,mouse.Hit.p,math.huge) | |
| 416 | wire2(part12.Position,mouse.Hit.p,math.huge) | |
| 417 | if mouse.Target then | |
| 418 | mouse.Target:breakJoints() | |
| 419 | if mouse.Target:getMass()<1000 then mouse.Target.Anchored=false end | |
| 420 | end | |
| 421 | wait() | |
| 422 | end | |
| 423 | beam.Parent=nil | |
| 424 | beam1.Parent=nil | |
| 425 | elseif (key=="q") then | |
| 426 | local target = findNearestTorso(me.Torso.Position) | |
| 427 | if target ~= nil then | |
| 428 | baned = game.Players:children() | |
| 429 | for x = 1, #baned do | |
| 430 | if baned[x].Name == peron.Name then | |
| 431 | head = target.Parent:findFirstChild("Humanoid")
| |
| 432 | if head.Health ~= 0 then | |
| 433 | tag = Instance.new("ObjectValue") tag.Value = baned[x] tag.Name = "creator" tag.Parent = head
| |
| 434 | Balefire(target.Position, target) Balefire1(target.Position, target) | |
| 435 | end | |
| 436 | end | |
| 437 | end | |
| 438 | end | |
| 439 | end | |
| 440 | end | |
| 441 | end | |
| 442 | function onSelected(mouse) | |
| 443 | mouse.Icon = "rbxasset://textures\\GunCursor.png" | |
| 444 | mouse.Button1Down:connect(function() onButton1Down(mouse) end) | |
| 445 | mouse.Button1Up:connect(function() onButton1Up(mouse) end) | |
| 446 | mouse.KeyDown:connect(function(key) onKeyDown(key,mouse) end) | |
| 447 | mouse.KeyUp:connect(function(key) onKeyUp(key,mouse) end) | |
| 448 | end | |
| 449 | bin.Selected:connect(onSelected) -- LEGO | |
| 450 | end | |
| 451 | peron.CharacterAdded:connect(function() wait() chair() end) | |
| 452 | chair() | |
| 453 | local HINT=Instance.new("ScreenGui",peron.PlayerGui)
| |
| 454 | local Text=Instance.new("Frame",HINT)
| |
| 455 | --Instance.new("ForceField",peron.Character)
| |
| 456 | Text.Position=UDim2.new(0.290000057, 0, 0.00999999978, 0) | |
| 457 | Text.Size=UDim2.new(0.45, 0, 0.0399999991, 0) | |
| 458 | --Text.Style="RobloxRound" | |
| 459 | Text.BackgroundTransparency=0.5 | |
| 460 | local INNER=Instance.new("TextLabel")
| |
| 461 | INNER.Parent=Text | |
| 462 | INNER.Position=UDim2.new(0.5,0,0.5,0) | |
| 463 | INNER.TextColor3=Color3.new(1,1,1) | |
| 464 | while wait() do | |
| 465 | INNER.Text="HoverChair OS | F Speed: "..speed.." C | To Fire YAR LAZERS, press Q. | N for FF, M to call " | |
| 466 | Text.Parent=HINT | |
| 467 | INNER.Parent=Text | |
| 468 | HINT.Parent=peron.PlayerGui | |
| 469 | end |