Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = owner
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- --Kidd_Anonymouse#9926 (thanks to whoever leaked it T-T)
- local player = owner
- local char = player.Character
- local head = char.Head
- local To = char.Torso
- local HRP = char.HumanoidRootPart
- local RA = char["Right Arm"]
- local LA = char["Left Arm"]
- local RL = char["Right Leg"]
- local LL = char["Left Leg"]
- local Hum = char:FindFirstChildOfClass("Humanoid")
- --game:service'InsertService':LoadAsset(14030252):children()[1].Parent=char
- --game:GetObjects("rbxassetid://857556803")[1].Parent=char
- for i = 5,1,-1 do
- if char:FindFirstChildOfClass("Accessory") ~= nil then char:FindFirstChildOfClass("Accessory"):remove()end
- end
- local h = Instance.new("Part",workspace)
- h.Size = Vector3.new()
- h.TopSurface = "Smooth"
- h.BottomSurface = "Smooth"
- h.CanCollide = false
- h.Anchored = false
- h.Name = "Handle"
- local a = Instance.new("Accessory",workspace)
- a.AttachmentForward = Vector3.new(0, -0.1, -0.995)
- a.AttachmentPos = Vector3.new(0, 0.15, -0.08)
- a.AttachmentRight = Vector3.new(1, 0, 0)
- a.AttachmentUp = Vector3.new(0, 0.995, -0.1)
- h.Parent = a
- a.Parent = char
- local a2 = Instance.new("Attachment",h)
- a2.Orientation = Vector3.new(-5.711, 0, -0)
- a2.Position = Vector3.new(0, 0.249, -0.09)
- a2.Axis = Vector3.new(1, -0, 0)
- a2.SecondaryAxis = Vector3.new(0, 0.995, -0.1)
- a2.Visible = false
- local m = Instance.new("SpecialMesh",h)
- m.MeshId = "http://www.roblox.com/asset/?id=13332444"
- m.MeshType = "FileMesh"
- m.Scale = Vector3.new(1.05, 1, 1.05)
- m.TextureId = "http://www.roblox.com/asset/?id=13693099"
- char:WaitForChild("Animate").walk.WalkAnim.AnimationId = "http://www.roblox.com/Asset?ID=252557606"
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- --game:GetObjects("rbxassetid://857556803")[1].Parent=char
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- local m = Instance.new("Model",char)
- local s1 = Instance.new("Sound",char)
- s1.SoundId = "rbxassetid://379250303"
- s1.Volume = 0.5
- s1.Looped = true
- s1:Play()
- if head:FindFirstChild("face")== nil then
- local d = Instance.new("Decal",head)
- d.Texture = "rbxassetid://664468442"
- d.Face = "Front"
- else
- head:FindFirstChild("face").Texture = "rbxassetid://664468442"
- end
- if char:FindFirstChildOfClass("Shirt")== nil then
- local s = Instance.new("Shirt",char)
- s.ShirtTemplate = "rbxassetid://762916834"
- else
- char:FindFirstChildOfClass("Shirt").ShirtTemplate = "rbxassetid://762916834"
- end
- if char:FindFirstChildOfClass("Pants")== nil then
- local s = Instance.new("Pants",char)
- s.PantsTemplate = "rbxassetid://843263078"
- else
- char:FindFirstChildOfClass("Pants").PantsTemplate = "rbxassetid://843263078"
- end
- char:WaitForChild("Body Colors").HeadColor = BrickColor.new("Pastel brown")
- char:WaitForChild("Body Colors").LeftArmColor = BrickColor.new("Pastel brown")
- char:WaitForChild("Body Colors").LeftLegColor = BrickColor.new("Pastel brown")
- char:WaitForChild("Body Colors").RightArmColor = BrickColor.new("Pastel brown")
- char:WaitForChild("Body Colors").RightLegColor = BrickColor.new("Pastel brown")
- char:WaitForChild("Body Colors").TorsoColor = BrickColor.new("Pastel brown")
- Hum.WalkSpeed = 100
- Hum.JumpPower = 100
- --[[
- head:WaitForChild("Jumping")
- head.Jumping.SoundId = "rbxassetid://151681170"
- head.Jumping.Volume = 3
- --]]
- local MousePart = Instance.new("Part",m)
- MousePart.CanCollide = false
- MousePart.BottomSurface = "Smooth"
- MousePart.TopSurface = "Smooth"
- MousePart.Size = Vector3.new(0.2, 0.2, 0.2)
- MousePart.Anchored = true
- function despawn1(part1,part2,length)
- for i = 10,1,-1 do
- part1.Transparency = part1.Transparency + 0.1
- part1.Size = part1.Size + Vector3.new(0.2,0.2,length)
- part1.Size = Vector3.new(part1.Size.X,part1.Size.Y,length)
- wait(0.01)
- end
- part1:remove()
- for i = 10,1,-1 do
- part2.Transparency = part2.Transparency + 0.1
- wait(0.01)
- end
- part2:remove()
- end
- function despawn2(part1,length)
- for i = 10,1,-1 do
- part1.Transparency = part1.Transparency + 0.1
- part1.Size = part1.Size + Vector3.new(0.2,0,length)
- part1.Size = Vector3.new(part1.Size.X,part1.Size.Y,length)
- wait(0.01)
- end
- part1:remove()
- end
- function snipe(T)
- local part = Instance.new("Part", m)
- part.Parent = m
- part.Name = "Sniper"
- part.BottomSurface = 0
- part.TopSurface = 0
- part.BrickColor = BrickColor.new("Shamrock")
- part.FormFactor = "Custom"
- part.Size = Vector3.new(1, 1, 3)
- part.Anchored = true
- part.Locked = true
- part.CanCollide = false
- part.Transparency = 0
- local S=part
- part.Position = char.Torso.Position + Vector3.new(math.random(-5,5),math.random(3,8),math.random(-5,5))
- part.CFrame = CFrame.new(part.Position,T.Position)
- obj = part
- local lastPos = obj.CFrame.p
- objC = obj:Clone()
- wait(0.05)
- objC.Parent = part
- objC.FormFactor = "Custom"
- objC.Anchored = true
- objC.BrickColor = BrickColor.new("New Yeller")
- local distance = (T.Position- obj.CFrame.p).magnitude
- objC.Size = Vector3.new(0.2,0.2,distance)
- objC.CFrame = CFrame.new(T.Position,obj.Position)*CFrame.new(0,0,-distance/2)
- local s = Instance.new("Sound",part)
- s.SoundId = "rbxassetid://441874008"
- s.Volume = 1
- s.TimePosition = math.random(15,30)
- s:Play()
- despawn1(objC,part,distance)
- if mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
- mouse.Target.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(20)
- local PETemp = Instance.new("ParticleEmitter",mouse.Target) --HitMarkers
- PETemp.Texture = "rbxassetid://857586798"
- PETemp.Acceleration = Vector3.new(0,-10,0)
- PETemp.Lifetime = NumberRange.new(2,4)
- PETemp.Speed = NumberRange.new(8,10)
- PETemp.Rate = 100
- PETemp.VelocitySpread = 50
- PETemp.Rotation = NumberRange.new(50,50)
- PETemp.RotSpeed = NumberRange.new(200,200)
- PETemp.Enabled = true
- wait(0.1)
- PETemp.Enabled = false
- end
- end
- mouse.KeyDown:connect(function(key)
- if key == "q" then
- MousePart.CFrame = CFrame.new(mouse.Hit.p)
- snipe(MousePart)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement