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 = game:GetService("Players").LocalPlayer
- 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 Mouse = Player:GetMouse()
- 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
- --------------------------
- --made by kalepo36 lolol--
- --Gun Thing--
- --------------------------
- local player = owner
- local chara = player.Character
- local ra2 = nil
- local la2 = nil
- local head = chara:WaitForChild("Head")
- local tors = chara:WaitForChild("Torso")
- local ra = chara:WaitForChild("Right Arm")
- local la = chara:WaitForChild("Left Arm")
- local rl = chara:WaitForChild("Right Leg")
- local ll = chara:WaitForChild("Left Leg")
- local huma = chara:WaitForChild("Humanoid")
- local neck = Instance.new("Weld",tors)
- neck.Part0 = tors
- neck.Part1 = head
- neck.C0 = CFrame.new(0,1.5,0)
- local nek = neck.C1
- local root = chara.HumanoidRootPart.RootJoint.C0
- local rs = tors["Right Shoulder"].C0
- local ls = tors["Left Shoulder"].C0
- local rh = Instance.new("Weld",tors)
- rh.Part0 = tors
- rh.Part1 = rl
- rh.C0 = CFrame.new(0.5,-1,0)
- rh.C1 = CFrame.new(0,1,0)
- local rhh = rh.C0
- local lh = Instance.new("Weld",tors)
- lh.Part0 = tors
- lh.Part1 = ll
- lh.C0 = CFrame.new(-0.5,-1,0)
- lh.C1 = CFrame.new(0,1,0)
- local lhh = lh.C0
- local rootpart = chara:WaitForChild("HumanoidRootPart")
- local pose = "idle"
- local sine=0
- local speeed=1
- attacking = false
- -------------------------------------------------------------
- print'made by a kalepo36'
- print'Q - Run'
- -------------------------------------------------------------
- function ragdoll(noob)
- local dead = Instance.new("VelocityMotor",noob)
- dead.Name = "Ragdolled"
- local socket = Instance.new("BallSocketConstraint",noob.Head)
- local acth1 = Instance.new("Attachment",noob.Head)
- acth1.Position = Vector3.new(0,-0.5,0)
- local acth2 = Instance.new("Attachment",noob.Torso)
- acth2.Position = Vector3.new(0,1,0)
- socket.Attachment0 = acth1
- socket.Attachment1 = acth2
- local socket2 = Instance.new("BallSocketConstraint",noob["Right Arm"])
- local acth3 = Instance.new("Attachment",noob["Right Arm"])
- acth3.Position = Vector3.new(0,0.5,0)
- local acth4 = Instance.new("Attachment",noob.Torso)
- acth4.Position = Vector3.new(1.5,0.5,0)
- socket2.Attachment0 = acth3
- socket2.Attachment1 = acth4
- local socket3 = Instance.new("BallSocketConstraint",noob["Left Arm"])
- local acth5 = Instance.new("Attachment",noob["Left Arm"])
- acth5.Position = Vector3.new(0,0.5,0)
- local acth6 = Instance.new("Attachment",noob.Torso)
- acth6.Position = Vector3.new(-1.5,0.5,0)
- socket3.Attachment0 = acth5
- socket3.Attachment1 = acth6
- local socket4 = Instance.new("BallSocketConstraint",noob["Right Leg"])
- local acth7 = Instance.new("Attachment",noob["Right Leg"])
- acth7.Position = Vector3.new(0,1,0)
- local acth8 = Instance.new("Attachment",noob.Torso)
- acth8.Position = Vector3.new(0.5,-1,0)
- socket4.Attachment0 = acth7
- socket4.Attachment1 = acth8
- local socket5 = Instance.new("BallSocketConstraint",noob["Left Leg"])
- local acth9 = Instance.new("Attachment",noob["Left Leg"])
- acth9.Position = Vector3.new(0,1,0)
- local acth10 = Instance.new("Attachment",noob.Torso)
- acth10.Position = Vector3.new(-0.5,-1,0)
- socket5.Attachment0 = acth9
- socket5.Attachment1 = acth10
- end
- function Noise(id,volume,parent,pitch)
- local sound = Instance.new("Sound", parent)
- sound.SoundId = "rbxassetid://"..id
- sound.Name = "SoundEffect"
- sound.PlaybackSpeed = pitch
- sound.Volume = volume
- sound:Play()
- coroutine.resume(coroutine.create(function()
- while sound ~= nil do
- wait()
- if sound.Playing == false then
- sound:Destroy()
- break
- end
- end
- end))
- end
- function onRunning(speed)
- if speed>0 then
- pose = "walking"
- else
- pose = "idle"
- end
- end
- function onDied()
- ragdoll(chara)
- ra2.Parent:Destroy()
- la2.Parent:Destroy()
- rootpart:Destroy()
- while game:GetService("RunService").Stepped:wait(0) do
- ra.Transparency = 0
- la.Transparency = 0
- end
- end
- huma.Died:Connect(onDied)
- huma.Running:Connect(onRunning)
- function Particle2(parent,material,direction,position,brickcolor,size,lifetime,speed,shape)
- local particle = Instance.new("Part",parent)
- particle.CFrame = position
- particle.Material = material
- particle.BrickColor = BrickColor.new(brickcolor)
- particle.Size = size
- particle.Anchored = true
- particle.CanCollide = false
- particle.Shape = shape
- local pos = particle.CFrame
- coroutine.resume(coroutine.create(function()
- for i = 0,lifetime,0.1 do
- game:GetService("RunService").Stepped:wait(0)
- particle.CFrame = particle.CFrame:Lerp(pos * speed,0.3)
- end
- local speed = 0.01
- repeat
- game:GetService("RunService").Stepped:wait(0)
- speed = speed + 0.01
- if direction == "Down" then
- particle.CFrame = particle.CFrame - Vector3.new(0,speed,0)
- elseif direction == "Up" then
- particle.CFrame = particle.CFrame + Vector3.new(0,speed,0)
- end
- particle.Transparency = particle.Transparency + 0.05
- until particle.Transparency >= 1
- particle:Destroy()
- end))
- end
- function Particle(parent,material,position,brickcolor,size,lifetime,speed,shape)
- local particle = Instance.new("Part",parent)
- particle.CFrame = position
- particle.Material = material
- particle.BrickColor = BrickColor.new(brickcolor)
- particle.Size = size
- particle.Anchored = true
- particle.CanCollide = false
- particle.Name = "Effect"
- local mezh = Instance.new("SpecialMesh",particle)
- mezh.MeshType = shape
- local pos = particle.CFrame
- coroutine.resume(coroutine.create(function()
- for i = 0,lifetime,0.1 do
- game:GetService("RunService").Stepped:wait(0)
- particle.CFrame = particle.CFrame:Lerp(pos * speed,0.3)
- end
- repeat
- game:GetService("RunService").Stepped:wait(0)
- particle.CFrame = particle.CFrame:Lerp(pos * speed,0.3)
- particle.Transparency = particle.Transparency + 0.05
- until particle.Transparency >= 1
- particle:Destroy()
- end))
- end
- function chat(text)
- if chara:FindFirstChild("ChatterBox") then
- chara:FindFirstChild("ChatterBox"):Destroy()
- end
- coroutine.resume(coroutine.create(function()
- local bill = Instance.new("BillboardGui",chara)
- bill.Adornee = head
- bill.StudsOffset = Vector3.new(0,3,0)
- local SO = bill.StudsOffset
- bill.Active = true
- bill.Size = UDim2.new(5,35,2,15)
- bill.Name = "ChatterBox"
- local tag = Instance.new("TextBox",bill)
- tag.Text = " "
- tag.Font = "Fantasy"
- tag.BackgroundTransparency = 1
- tag.Size = UDim2.new(1,0,0.5,0)
- tag.BorderSizePixel = 0
- tag.TextSize = 50
- tag.Active = true
- tag.TextColor3 = Color3.new(255,255,255)
- tag.TextStrokeTransparency = 1
- tag.TextTransparency = 1
- tag.TextStrokeColor3 = Color3.new(0, 0, 0)
- for i = 1, string.len(text) do
- game:GetService("RunService").Stepped:wait(0)
- Noise(418252437,1,head,math.random(8,12)/15)
- tag.Text = string.sub(text, 1, i)
- tag.TextStrokeTransparency = tag.TextStrokeTransparency - 0.05
- tag.TextTransparency = tag.TextTransparency - 0.05
- bill.StudsOffset = Vector3.new(math.random(-1,1)/15,3 + math.random(-1,1)/15,math.random(-1,1)/15)
- end
- bill.StudsOffset = Vector3.new(0,3,0)
- repeat
- game:GetService("RunService").Stepped:wait(0)
- tag.TextStrokeTransparency = tag.TextStrokeTransparency - 0.05
- tag.TextTransparency = tag.TextTransparency - 0.05
- bill.StudsOffset = Vector3.new(math.random(-1,1)/15,3 + math.random(-1,1)/15,math.random(-1,1)/15)
- until tag.TextTransparency <= 0
- local ang = math.random(-2.5,2.5)
- wait(2.5)
- for i = 0,10,0.1 do
- game:GetService("RunService").Stepped:wait(0)
- tag.TextTransparency = tag.TextTransparency + 0.05
- tag.TextStrokeTransparency = tag.TextStrokeTransparency + 0.05
- bill.StudsOffset = Vector3.new(0,3-i)
- tag.Rotation = tag.Rotation + ang
- end
- bill:Destroy()
- end))
- end
- -------------------------------------------------------------
- huma.WalkSpeed = 8
- -----------------------------------------------------------
- for i = 0,1,0.1 do
- game:GetService("RunService").Stepped:wait(0)
- if huma:FindFirstChild("Animator") then
- huma.Animator:Destroy()
- end
- end
- -----
- local model1 = Instance.new("Model",workspace)
- model1.Name = "FakeArmR"
- ra2 = ra:Clone()
- ra2.Parent = model1
- local weld = Instance.new("Weld",ra)
- weld.Part0 = ra
- weld.Part1 = ra2
- local huma2 = Instance.new("Humanoid",model1)
- for _, c in pairs(chara:GetChildren()) do
- if c:IsA("Shirt") or c:IsA("CharacterMesh") then
- c:Clone().Parent = model1
- end
- end
- local model2 = Instance.new("Model",workspace)
- model2.Name = "FakeArmL"
- la2 = la:Clone()
- la2.Parent = model2
- local weld = Instance.new("Weld",la)
- weld.Part0 = la
- weld.Part1 = la2
- local huma3 = Instance.new("Humanoid",model2)
- for _, c in pairs(chara:GetChildren()) do
- if c:IsA("Shirt") or c:IsA("CharacterMesh") then
- c:Clone().Parent = model2
- end
- end
- local camcf = huma.CameraOffset
- local gun = Instance.new("Part",workspace)
- gun.Size = Vector3.new(0.5,1.1,2.5)
- local mesh = Instance.new("SpecialMesh",gun)
- mesh.MeshId = "rbxassetid://436697873"
- mesh.TextureId = "rbxassetid://436697889"
- mesh.Scale = Vector3.new(.035,.035,.035)
- local weld = Instance.new("Weld",ra)
- weld.Part0 = ra
- weld.Part1 = gun
- weld.C1 = CFrame.new(-0.4,-0.25,-1.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-190))
- -----
- function Shoot()
- Noise(356911785,0.5,gun,math.random(13,18)/15)
- local bullet = Instance.new("Part",chara)
- bullet.Material = "Neon"
- bullet.Shape = "Cylinder"
- bullet.BrickColor = BrickColor.new("New Yeller")
- bullet.Size = Vector3.new((gun.CFrame.p - mouse.Hit.p).magnitude,0.5,0.5)
- bullet.CFrame = CFrame.new(gun.CFrame.p, mouse.Hit.p) * CFrame.new(0,0.5,-(gun.CFrame.p - mouse.Hit.p).magnitude/2) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- bullet.Anchored = true
- bullet.CanCollide = false
- bullet.Touched:Connect(function(hit)
- if hit.Name ~= "Base" and hit ~= ra2 and hit ~= la2 and hit ~= gun and hit.Parent ~= chara and hit.Parent.Parent ~= chara then
- hit:BreakJoints()
- end
- end)
- coroutine.resume(coroutine.create(function()
- for i = 0,5,0.1 do
- game:GetService("RunService").Stepped:wait(0)
- bullet.Transparency = i
- bullet.Size = bullet.Size - Vector3.new(0.05,0.05,0.05)
- end
- bullet:Destroy()
- end))
- end
- -----
- ra.Transparency = 1
- la.Transparency = 1
- mouse.KeyDown:Connect(function(ky)
- if attacking == false then
- if ky == 'q' and huma.WalkSpeed == 8 then huma.WalkSpeed = 30
- elseif ky == 'q' and huma.WalkSpeed == 30 then huma.WalkSpeed = 8
- end
- end
- end)
- mouse.Button1Down:Connect(function()
- if attacking == false then
- Shoot()
- end
- end)
- --chatfunction V
- player.Chatted:Connect(function(msg)
- if msg == "im gae" or msg == "im gay" or msg == "i'm gae" or msg == "i'm gay" or msg == "Im gae" or msg == "Im gay" or msg == "I'm gae" or msg == "I'm gay" then
- chat("no im not")
- else
- chat(msg)
- end
- end)
- while game:GetService("RunService").Stepped:wait(0) do
- sine = sine + speeed
- if huma.Health ~= 0 then
- ra.Transparency = 1
- la.Transparency = 1
- end
- if pose == 'idle' and attacking == false then
- speeed = 1
- huma.CameraOffset = huma.CameraOffset:Lerp(Vector3.new(0,0.1 *math.cos(sine / 20),0),0.15)
- neck.C1 = neck.C1:Lerp(nek * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-2.5 *math.cos(sine / 20)),math.rad(0),math.rad(0)),0.15)
- rootpart.RootJoint.C0 = rootpart.RootJoint.C0:Lerp(root * CFrame.new(0,0,0.1 *math.cos(sine / 20)) * CFrame.Angles(math.rad(1.25 *math.sin(sine / 20)),math.rad(0),math.rad(0)),0.15)
- tors["Right Shoulder"].C0 = tors["Right Shoulder"].C0:Lerp(rs * CFrame.new(0.2,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(15),math.rad(90)),0.15)
- tors["Left Shoulder"].C0 = tors["Left Shoulder"].C0:Lerp(ls * CFrame.new(-0.4,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(-50),math.rad(-90)),0.15)
- rh.C0 = rh.C0:Lerp(rhh * CFrame.new(0,-0.1 *math.cos(sine / 20),-0.025 *math.sin(sine / 20)) * CFrame.Angles(math.rad(1.25 *math.sin(sine / 20)),math.rad(0),math.rad(0)),0.15)
- lh.C0 = lh.C0:Lerp(lhh * CFrame.new(0,-0.1 *math.cos(sine / 20),-0.025 *math.sin(sine / 20)) * CFrame.Angles(math.rad(1.25 *math.sin(sine / 20)),math.rad(0),math.rad(0)),0.15)
- elseif pose == 'walking' and attacking == false then
- if huma.WalkSpeed <= 16 then
- speeed = 0.5
- huma.CameraOffset = huma.CameraOffset:Lerp(Vector3.new(0.075 *math.cos(sine / 7),0.125 *math.sin(sine / 3.5),0),0.15)
- neck.C1 = neck.C1:Lerp(nek * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
- rootpart.RootJoint.C0 = rootpart.RootJoint.C0:Lerp(root * CFrame.new(0,0,0) * CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),0.15)
- tors["Right Shoulder"].C0 = tors["Right Shoulder"].C0:Lerp(rs * CFrame.new(0.2,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(15),math.rad(90)),0.15)
- tors["Left Shoulder"].C0 = tors["Left Shoulder"].C0:Lerp(ls * CFrame.new(-0.4,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(-50),math.rad(-90)),0.15)
- rh.C0 = rh.C0:Lerp(rhh * CFrame.new(0,0,0) * CFrame.Angles(math.rad(30 *math.cos(sine / 7)),math.rad(0),math.rad(0)),0.15)
- lh.C0 = lh.C0:Lerp(lhh * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-30 *math.cos(sine / 7)),math.rad(0),math.rad(0)),0.15)
- elseif huma.WalkSpeed >= 16 then
- speeed = 1
- huma.CameraOffset = huma.CameraOffset:Lerp(Vector3.new(0.075 *math.cos(sine / 7),0.125 *math.sin(sine / 3.5),0),0.15)
- neck.C1 = neck.C1:Lerp(nek * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
- rootpart.RootJoint.C0 = rootpart.RootJoint.C0:Lerp(root * CFrame.new(0,0,0) * CFrame.Angles(math.rad(15),math.rad(0),math.rad(0)),0.15)
- tors["Right Shoulder"].C0 = tors["Right Shoulder"].C0:Lerp(rs * CFrame.new(0.2,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(15),math.rad(90)),0.15)
- tors["Left Shoulder"].C0 = tors["Left Shoulder"].C0:Lerp(ls * CFrame.new(-0.4,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(-50),math.rad(-90)),0.15)
- rh.C0 = rh.C0:Lerp(rhh * CFrame.new(0,0,0) * CFrame.Angles(math.rad(70 *math.cos(sine / 7)),math.rad(0),math.rad(0)),0.15)
- lh.C0 = lh.C0:Lerp(lhh * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-70 *math.cos(sine / 7)),math.rad(0),math.rad(0)),0.15)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement