Jul 27th, 2014
Today i make my beautiful dog a roblox account. How to play egg farm simulator roblox. Drop a like for a puppyFollow me on Twitter(I tweet amazing things): me on Instag.
Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- if trace > 0 then
- local recip = 0.5/s
- return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
- local i = 0
- i = 1
- if m22 > (i 0 and m00 or m11) then
- end
- local s = math.sqrt(m00-m11-m22+1)
- return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
- local s = math.sqrt(m11-m22-m00+1)
- return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
- local s = math.sqrt(m22-m00-m11+1)
- local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
- end
- local function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local wx, wy, wz = w*xs, w*ys, w*zs
- local xy = x*ys
- local yy = y*ys
- local zz = z*zs
- return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
- local function QuaternionSlerp(a, b, t)
- local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
- if cosTheta >= 0.0001 then
- local theta = math.acos(cosTheta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- else
- finishInterp = t
- else
- local theta = math.acos(-cosTheta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- else
- finishInterp = t
- end
- return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
- function clerp(a,b,t)
- local qb = {QuaternionFromCFrame(b)}
- local bx, by, bz = b.x, b.y, b.z
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- plr = game:service'Players'.LocalPlayer
- mouse = plr:GetMouse()
- torso = char:findFirstChild('Torso')
- ra = char:findFirstChild('Right Arm')
- rl = char:findFirstChild('Right Leg')
- rs = torso:findFirstChild('Right Shoulder')
- rh = torso:findFirstChild('Right Hip')
- neck = torso:findFirstChild('Neck')
- rj = char:findFirstChild('HumanoidRootPart'):findFirstChild('RootJoint')
- rootpart = char:findFirstChild('HumanoidRootPart')
- if anim then
- end
- rm.C0 = CFrame.new(1.5, 0.5, 0)
- rm.Part0 = torso
- local lm = Instance.new('Motor', torso)
- lm.C1 = CFrame.new(0, 0.5, 0)
- lm.Part1 = la
- local rlegm = Instance.new('Motor', torso)
- rlegm.C1 = CFrame.new(0, 1, 0)
- rlegm.Part1 = rl
- llegm.C0 = CFrame.new(-0.5, -1, 0)
- llegm.Part0 = torso
- neck.C1 = CFrame.new(0, -0.5, 0)
- rj.C1 = CFrame.new()
- sound.SoundId = 'http://www.roblox.com/asset/?id=130797915'
- sound.Looped = true
- for i,v in pairs(char:children()) do
- v:Destroy()
- end
- game:service'InsertService':LoadAsset(151784320):children()[1].Parent = char
- print'sweg, madiik made dis kthx' --ogm y found meh sekret
- local angle = 0
- local humanwalk = false
- rsc0 = rm.C0
- llc0 = llegm.C0
- neckc0 = neck.C0
- local controllerService = game:GetService('ControllerService')
- local controller = controllerService:GetChildren()[1]
- controller.Parent = nil
- Instance.new('HumanoidController', game:service'ControllerService')
- Instance.new('SkateboardController', game:service'ControllerService')
- Instance.new('VehicleController', game:service'ControllerService')
- local controller = controllerService:GetChildren()[1]
- if k 'q' then
- end
- if not sound.IsPlaying then
- sound.SoundId = 'http://www.roblox.com/asset/?id=130802245'
- sound:play()
- end
- if not sound.IsPlaying then
- sound.SoundId = 'http://www.roblox.com/asset/?id=130797915'
- sound:play()
- end
- if not sound.IsPlaying then
- sound.SoundId = 'http://www.roblox.com/asset/?id=149713968'
- sound:play()
- end
- humanoid.WalkSpeed = 34
- mouse.KeyUp:connect(function(k)
- if string.byte(k) 48 then
- end
- end)
- while wait() do
- mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
- local lscf = lsc0
- local llcf = llc0
- local ncf = neckc0
- local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
- local hitz, enz = workspace:findPartOnRay(rayz, char)
- if sound.IsPlaying then
- end
- if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
- ncf = neckc0 * CFrame.Angles(math.pi/5, 0, 0)
- rjcf = CFrame.new() * CFrame.Angles(-math.pi/5, math.sin(angle)*0.05, 0)
- rscf = rsc0 * CFrame.Angles(math.pi/1.7+math.sin(angle)*0.1, 0, 0)
- lscf = lsc0 * CFrame.Angles(math.pi/1.7+math.sin(-angle)*0.1, 0, 0)
- rlcf = rlc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.3, 0, 0)
- llcf = llc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.3, 0, 0)
- else
- ncf = neckc0 * CFrame.Angles(math.pi/14, 0, 0)
- rjcf = CFrame.new() * CFrame.Angles(-math.pi/18, math.sin(angle)*0.05, 0)
- rscf = rsc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.2, 0, 0)
- lscf = lsc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.2, 0, 0)
- rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) CFrame.Angles(-math.pi/14, 0, 0)
- elseif humanoid.Sit then
- if sound.IsPlaying and sound.SoundId 'http://www.roblox.com/asset/?id=130797915' then
- ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
- rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
- rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
- lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
- rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
- llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
- elseif sound.IsPlaying and sound.SoundId 'http://www.roblox.com/asset/?id=135570347' then
- ncf = neckc0 * CFrame.Angles(math.pi/5-math.abs(math.sin(angle))*0.3, 0, 0)
- rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
- rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
- lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
- rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
- llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
- elseif sound.IsPlaying and sound.SoundId 'http://www.roblox.com/asset/?id=149713968' then
- ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
- rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
- rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
- lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
- rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
- llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
- anglespeed = 1/2
- ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
- rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
- rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
- lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
- rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
- llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
- elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
- if sound.IsPlaying and sound.SoundId 'http://www.roblox.com/asset/?id=130797915' then
- ncf = neckc0 * CFrame.Angles(math.pi/10-math.sin(angle)*0.07, 0, 0)
- rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/10, math.sin(angle)*0.001, 0)
- rscf = rsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
- lscf = lsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
- rlcf = rlc0 * CFrame.Angles(math.pi/10, math.sin(angle)*0.08, math.rad(6.5))
- llcf = llc0 * CFrame.Angles(math.pi/10, -math.sin(angle)*0.08, -math.rad(6.5))
- elseif sound.IsPlaying and sound.SoundId 'http://www.roblox.com/asset/?id=149713968' then
- ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3, 0, 0)
- rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*0.001, 0)
- rscf = rsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
- lscf = lsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
- rlcf = rlc0 * CFrame.Angles(math.pi/20, math.sin(angle)*0.08, math.rad(2.5))
- llcf = llc0 * CFrame.Angles(math.pi/20, -math.sin(angle)*0.08, -math.rad(2.5))
- elseif sound.IsPlaying and sound.SoundId 'http://www.roblox.com/asset/?id=130802245' then
- ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
- rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
- rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.05, 0, 0)
- lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
- rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
- llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
- if humanwalk then
- ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
- rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
- rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
- lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
- rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
- llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
- anglespeed = 1/2
- ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
- rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
- rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
- lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
- rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
- llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
- end
- elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
- sound:stop()
- if humanwalk then
- ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
- rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/24, -mvmnt*.02, 0)
- rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
- lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
- rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
- llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
- anglespeed = 4
- ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
- rjcf = CFrame.new(0, -1.5+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9, math.sin(mvmnt/2)*0.05, 0)
- rscf = rsc0 * CFrame.new(-.45, 0.2, -.4+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(angle)*0.7, 0, math.rad(5))
- lscf = lsc0 * CFrame.new(.45, 0.2, .1-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(-angle)*0.7, 0, -math.rad(5))
- rlcf = rlc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*0.6, 0, math.abs(mvmnt)*0.025)
- llcf = llc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(angle)*.6, 0, -math.abs(mvmnt)*0.025)
- elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
- sound:stop()
- if humanwalk then
- ncf = neckc0 * CFrame.Angles(math.pi/20, math.sin(angle)*.04, 0)
- rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(-math.pi/20, -math.sin(angle)*.08, 0)
- rscf = rsc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/18+math.sin(angle)*1.5, 0, -math.abs(mvmnt)*0.02)
- lscf = lsc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/18+math.sin(-angle)*1.5, 0, math.abs(mvmnt)*0.02)
- rlcf = rlc0 * CFrame.new(0, 0, -.6+math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
- llcf = llc0 * CFrame.new(0, 0, -math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
- anglespeed = 5.5
- ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
- rjcf = CFrame.new(0, -1.3+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9+math.abs(mvmnt/2)*0.1, 0, 0)
- rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
- lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
- rlcf = rlc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, math.abs(mvmnt)*0.025)
- llcf = llc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, -math.abs(mvmnt)*0.025)
- end
- rm.C0 = clerp(rm.C0,rscf,speed)
- rj.C0 = clerp(rj.C0,rjcf,speed)
- rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
- end
RAW Paste Data