SHOW:
|
|
- or go back to the newest paste.
| 1 | -- This script has been converted to FE by iPxter | |
| 2 | ||
| 3 | ||
| 4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 6 | do | |
| 7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
| |
| 8 | script.Parent = Player.Character | |
| 9 | ||
| 10 | --RemoteEvent for communicating | |
| 11 | local Event = Instance.new("RemoteEvent")
| |
| 12 | Event.Name = "UserInput_Event" | |
| 13 | ||
| 14 | --Fake event to make stuff like Mouse.KeyDown work | |
| 15 | local function fakeEvent() | |
| 16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 17 | t.connect = t.Connect | |
| 18 | return t | |
| 19 | end | |
| 20 | ||
| 21 | --Creating fake input objects with fake variables | |
| 22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 26 | end} | |
| 27 | --Merged 2 functions into one by checking amount of arguments | |
| 28 | CAS.UnbindAction = CAS.BindAction | |
| 29 | ||
| 30 | --This function will trigger the events that have been :Connect()'ed | |
| 31 | local function te(self,ev,...) | |
| 32 | local t = m[ev] | |
| 33 | if t and t._fakeEvent and t.Function then | |
| 34 | t.Function(...) | |
| 35 | end | |
| 36 | end | |
| 37 | m.TrigEvent = te | |
| 38 | UIS.TrigEvent = te | |
| 39 | ||
| 40 | Event.OnServerEvent:Connect(function(plr,io) | |
| 41 | if plr~=Player then return end | |
| 42 | if io.isMouse then | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | else | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | for _,t in pairs(CAS.Actions) do | |
| 51 | for _,k in pairs(t.Keys) do | |
| 52 | if k==io.KeyCode then | |
| 53 | t.Function(t.Name,io.UserInputState,io) | |
| 54 | end | |
| 55 | end | |
| 56 | end | |
| 57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 59 | end | |
| 60 | end) | |
| 61 | Event.Parent = NLS([==[ | |
| 62 | local Player = game:GetService("Players").Rohan_Kishiba
| |
| 63 | local Event = script:WaitForChild("UserInput_Event")
| |
| 64 | ||
| 65 | local UIS = game:GetService("UserInputService")
| |
| 66 | local input = function(io,a) | |
| 67 | if a then return end | |
| 68 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 70 | end | |
| 71 | UIS.InputBegan:Connect(input) | |
| 72 | UIS.InputEnded:Connect(input) | |
| 73 | ||
| 74 | local Mouse = Player:GetMouse() | |
| 75 | local h,t | |
| 76 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 77 | --If player is not moving their mouse, client won't fire events | |
| 78 | while wait(1/30) do | |
| 79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 80 | h,t=Mouse.Hit,Mouse.Target | |
| 81 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 82 | end | |
| 83 | end]==],Player.Character) | |
| 84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 85 | end | |
| 86 | ||
| 87 | --By Rufus14 | |
| 88 | - | gun = Instance.new("Part", game.Players.owner.Character)
|
| 88 | + | gun = Instance.new("Part", game:service("Players").Rohan_Kishiba)
|
| 89 | gun.Size = Vector3.new(0.5, 1, 2) | |
| 90 | gun.CanCollide = false | |
| 91 | gun:BreakJoints() | |
| 92 | weld = Instance.new("Weld", gun)
| |
| 93 | - | weld.Part0 = game.Players.owner.Character["Right Arm"] |
| 93 | + | weld.Part0 = game:service("Players").Rohan_Kishiba["Right Arm"]
|
| 94 | weld.Part1 = gun | |
| 95 | weld.C0 = weld.C0 * CFrame.new(-0.2,-1.7,-0.25) * CFrame.Angles(0,1.6,-1.53) | |
| 96 | mesh = Instance.new("SpecialMesh", gun)
| |
| 97 | mesh.MeshId = "rbxassetid://623102664" | |
| 98 | mesh.TextureId = "rbxassetid://623102879" | |
| 99 | mesh.Scale = Vector3.new(0.01,0.01,0.01) | |
| 100 | - | local rhandweld = Instance.new("Weld", game.Players.owner.Character.Torso)
|
| 100 | + | local rhandweld = Instance.new("Weld", game:service("Players").Rohan_Kishiba.Character.Torso)
|
| 101 | - | rhandweld.Part0 = game.Players.owner.Character.Torso |
| 101 | + | rhandweld.Part0 = game:service("Players").Rohan_Kishiba.Character.Torso
|
| 102 | - | rhandweld.Part1 = game.Players.owner.Character["Right Arm"] |
| 102 | + | rhandweld.Part1 = game:service("Players").Rohan_Kishiba.Character["Right Arm"]
|
| 103 | rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 104 | rhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 105 | shooting = false | |
| 106 | for i = 1,2 do | |
| 107 | wait() | |
| 108 | rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03) | |
| 109 | end | |
| 110 | for i = 1,2 do | |
| 111 | wait() | |
| 112 | rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07) | |
| 113 | end | |
| 114 | for i = 1,7 do | |
| 115 | wait() | |
| 116 | rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.17) | |
| 117 | end | |
| 118 | for i = 1,2 do | |
| 119 | wait() | |
| 120 | rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.07) | |
| 121 | end | |
| 122 | for i = 1,2 do | |
| 123 | wait() | |
| 124 | rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.03) | |
| 125 | end | |
| 126 | function shoot() | |
| 127 | if not shooting then | |
| 128 | shooting = true | |
| 129 | local shotsound = Instance.new("Sound", gun)
| |
| 130 | shotsound.EmitterSize = 1 | |
| 131 | shotsound.SoundId = "rbxassetid://139593133" | |
| 132 | shotsound.Volume = 3 | |
| 133 | shotsound:Play() | |
| 134 | local missle = Instance.new("Part", workspace)
| |
| 135 | missle.Size = Vector3.new(0.05,0.05,0.05) | |
| 136 | missle.BrickColor = BrickColor.new("New Yeller")
| |
| 137 | missle:BreakJoints() | |
| 138 | missle.CFrame = gun.CFrame | |
| 139 | local velo = Instance.new("BodyVelocity", missle)
| |
| 140 | velo.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 141 | velo.Velocity = mouse.Hit.lookVector * 190 | |
| 142 | for i = 1,2 do | |
| 143 | weld.C0 = weld.C0 * CFrame.Angles(0,0,0.14) | |
| 144 | rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.14) | |
| 145 | end | |
| 146 | for i = 1,2 do | |
| 147 | wait() | |
| 148 | weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07) | |
| 149 | rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07) | |
| 150 | end | |
| 151 | local function kill(part) | |
| 152 | local hum = part.Parent:findFirstChild("Humanoid")
| |
| 153 | local torso = part.Parent:findFirstChild("Torso")
| |
| 154 | local larm = part.Parent:findFirstChild("Left Arm")
| |
| 155 | local rarm = part.Parent:findFirstChild("Right Arm")
| |
| 156 | local lleg = part.Parent:findFirstChild("Left Leg")
| |
| 157 | local rleg = part.Parent:findFirstChild("Right Leg")
| |
| 158 | missle:destroy() | |
| 159 | if hum ~= nil then | |
| 160 | if torso then | |
| 161 | hum.Health = hum.Health - math.random(25,68) | |
| 162 | local shotsound1 = Instance.new("Sound", torso)
| |
| 163 | shotsound1:Play() | |
| 164 | shotsound1.EmitterSize = 1 | |
| 165 | shotsound1.SoundId = "rbxassetid://144884872" | |
| 166 | shotsound1.Volume = 2 | |
| 167 | shotsound1:Play() | |
| 168 | local shotsound1 = Instance.new("Sound", torso)
| |
| 169 | shotsound1:Play() | |
| 170 | shotsound1.EmitterSize = 1 | |
| 171 | shotsound1.SoundId = "rbxassetid://175272131" | |
| 172 | shotsound1.Volume = 2 | |
| 173 | shotsound1:Play() | |
| 174 | using = false | |
| 175 | hit = Instance.new("Sound", torso)
| |
| 176 | hit.SoundId = "rbxassetid://260430060" | |
| 177 | hit.Volume = 5 | |
| 178 | hit1 = Instance.new("Sound", torso)
| |
| 179 | hit1.SoundId = "rbxassetid://138087186" | |
| 180 | hit1.Volume = 5 | |
| 181 | hit2 = Instance.new("Sound", torso)
| |
| 182 | hit2.SoundId = "rbxassetid://131237241" | |
| 183 | hit2.Volume = 5 | |
| 184 | hit3 = Instance.new("Sound", torso)
| |
| 185 | hit3.SoundId = "rbxassetid://278062209" | |
| 186 | hit3.Volume = 5 | |
| 187 | hit3.TimePosition = 0.33 | |
| 188 | print("You killed "..hum.Parent.Name)
| |
| 189 | hum.PlatformStand = true | |
| 190 | ---------- | |
| 191 | local lhip = torso:findFirstChild("Left Hip")
| |
| 192 | if lhip then | |
| 193 | --- | |
| 194 | torso["Left Hip"]:destroy() | |
| 195 | - | local head = game.Players.owner.Character.Head |
| 195 | + | local head = game:service("Players").Rohan_Kishiba.Character.Head
|
| 196 | local glue = Instance.new("Glue", torso)
| |
| 197 | glue.Part0 = torso | |
| 198 | glue.Part1 = torso.Parent["Left Leg"] | |
| 199 | glue.Name = "Left leg" | |
| 200 | local collider = Instance.new("Part", torso.Parent["Left Leg"])
| |
| 201 | collider.Position = Vector3.new(0,999,0) | |
| 202 | collider.Size = Vector3.new(1.7, 1, 1) | |
| 203 | collider.Shape = "Cylinder" | |
| 204 | local weld = Instance.new("Weld", collider)
| |
| 205 | weld.Part0 = torso.Parent["Left Leg"] | |
| 206 | weld.Part1 = collider | |
| 207 | weld.C0 = CFrame.Angles(0, 0, 80) | |
| 208 | collider.TopSurface = "Smooth" | |
| 209 | collider.BottomSurface = "Smooth" | |
| 210 | collider.formFactor = "Symmetric" | |
| 211 | glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 212 | glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 213 | collider.Transparency = 1 | |
| 214 | end | |
| 215 | local rhip = torso:findFirstChild("Right Hip")
| |
| 216 | if rhip then | |
| 217 | ------------ | |
| 218 | torso["Right Hip"]:destroy() | |
| 219 | local glue1 = Instance.new("Glue", torso)
| |
| 220 | glue1.Part0 = torso | |
| 221 | glue1.Part1 = torso.Parent["Right Leg"] | |
| 222 | glue1.Name = "Right leg" | |
| 223 | local collider1 = Instance.new("Part", torso.Parent["Right Leg"])
| |
| 224 | collider1.Position = Vector3.new(0,9999,0) | |
| 225 | collider1.Size = Vector3.new(1.7, 1, 1) | |
| 226 | collider1.Shape = "Cylinder" | |
| 227 | local weld1 = Instance.new("Weld", collider1)
| |
| 228 | weld1.Part0 = torso.Parent["Right Leg"] | |
| 229 | weld1.Part1 = collider1 | |
| 230 | weld1.C0 = CFrame.Angles(0, 0, 80) | |
| 231 | collider1.TopSurface = "Smooth" | |
| 232 | collider1.BottomSurface = "Smooth" | |
| 233 | collider1.formFactor = "Symmetric" | |
| 234 | glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 235 | glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 236 | collider1.Transparency = 1 | |
| 237 | end | |
| 238 | ------------ | |
| 239 | local rshoulder = torso:findFirstChild("Right Shoulder")
| |
| 240 | if rshoulder then | |
| 241 | torso["Right Shoulder"]:destroy() | |
| 242 | local glue11 = Instance.new("Glue", torso)
| |
| 243 | glue11.Part0 = torso | |
| 244 | glue11.Part1 = torso.Parent["Right Arm"] | |
| 245 | glue11.Name = "Right shoulder" | |
| 246 | local collider11 = Instance.new("Part", torso.Parent["Right Arm"])
| |
| 247 | collider11.Position = Vector3.new(0,9999,0) | |
| 248 | collider11.Size = Vector3.new(1.8,1,1) | |
| 249 | collider11.Shape = "Cylinder" | |
| 250 | local weld11 = Instance.new("Weld", collider11)
| |
| 251 | weld11.Part0 = torso.Parent["Right Arm"] | |
| 252 | weld11.Part1 = collider11 | |
| 253 | weld11.C0 = CFrame.Angles(0, 0, 80) | |
| 254 | collider11.TopSurface = "Smooth" | |
| 255 | collider11.BottomSurface = "Smooth" | |
| 256 | collider11.formFactor = "Symmetric" | |
| 257 | glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 258 | glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 259 | collider11.Transparency = 1 | |
| 260 | end | |
| 261 | ------------ | |
| 262 | local lshoulder = torso:findFirstChild("Left Shoulder")
| |
| 263 | if lshoulder then | |
| 264 | torso["Left Shoulder"]:destroy() | |
| 265 | local glue111 = Instance.new("Glue", torso)
| |
| 266 | glue111.Part0 = torso | |
| 267 | glue111.Part1 = torso.Parent["Left Arm"] | |
| 268 | glue111.Name = "Left shoulder" | |
| 269 | local collider111 = Instance.new("Part", torso.Parent["Left Arm"])
| |
| 270 | collider111.Position = Vector3.new(0,9999,0) | |
| 271 | collider111.Size = Vector3.new(1.8,1,1) | |
| 272 | collider111.Shape = "Cylinder" | |
| 273 | local weld111 = Instance.new("Weld", collider111)
| |
| 274 | weld111.Part0 = torso.Parent["Left Arm"] | |
| 275 | weld111.Part1 = collider111 | |
| 276 | weld111.C0 = CFrame.Angles(0, 0, 80) | |
| 277 | collider111.TopSurface = "Smooth" | |
| 278 | collider111.BottomSurface = "Smooth" | |
| 279 | collider111.formFactor = "Symmetric" | |
| 280 | glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 281 | glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 282 | collider111.Transparency = 1 | |
| 283 | end | |
| 284 | ----------------- | |
| 285 | local sensoring = Instance.new("Part", torso)
| |
| 286 | sensoring.Size = Vector3.new(1.2,1.1,0.8) | |
| 287 | sensoring.CanCollide = false | |
| 288 | sensoring.Position = torso.Position | |
| 289 | local welder = Instance.new("Weld", sensoring)
| |
| 290 | welder.Part0 = torso | |
| 291 | welder.Part1 = sensoring | |
| 292 | welder.C0 = welder.C0 * CFrame.new(0,0,1.05) | |
| 293 | sensoring.Transparency = 1 | |
| 294 | ----------------- | |
| 295 | local sensoring1 = Instance.new("Part", torso)
| |
| 296 | sensoring1.Size = Vector3.new(1.2,1.1,0.8) | |
| 297 | sensoring1.CanCollide = false | |
| 298 | sensoring1.Position = torso.Position | |
| 299 | local welder1 = Instance.new("Weld", sensoring)
| |
| 300 | welder1.Part0 = torso | |
| 301 | welder1.Part1 = sensoring1 | |
| 302 | welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05) | |
| 303 | sensoring1.Transparency = 1 | |
| 304 | local function touch() | |
| 305 | if not using then | |
| 306 | using = true | |
| 307 | local Math = math.random(1,4) | |
| 308 | if Math == 1 then | |
| 309 | hit:Play() | |
| 310 | end | |
| 311 | if Math == 2 then | |
| 312 | hit1:Play() | |
| 313 | end | |
| 314 | if Math == 3 then | |
| 315 | hit2:Play() | |
| 316 | end | |
| 317 | if Math == 4 then | |
| 318 | hit3:Play() | |
| 319 | end | |
| 320 | wait(0.1) | |
| 321 | using = false | |
| 322 | end | |
| 323 | end | |
| 324 | sensoring.Touched:connect(touch) | |
| 325 | sensoring1.Touched:connect(touch) | |
| 326 | while true do | |
| 327 | wait(0.3) | |
| 328 | hum.PlatformStand = true | |
| 329 | end | |
| 330 | ||
| 331 | --di ent | |
| 332 | end | |
| 333 | end | |
| 334 | end | |
| 335 | missle.Touched:connect(kill) | |
| 336 | for i = 1,2 do | |
| 337 | wait() | |
| 338 | weld.C0 = weld.C0 * CFrame.Angles(0,0,-0.07) | |
| 339 | rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.07) | |
| 340 | end | |
| 341 | shooting = false | |
| 342 | wait(3) | |
| 343 | shotsound:destroy() | |
| 344 | end | |
| 345 | end | |
| 346 | mouse.Button1Down:connect(shoot) |