-- Services local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local DataStoreService = game:GetService("DataStoreService") local Debris = game:GetService("Debris") local TweenService = game:GetService("TweenService") local PhysicsService = game:GetService("PhysicsService") -- Constants local DATA_VERSION = "v1.0.5" local SAVE_INTERVAL = 60 local MAX_RETRIES = 3 -- Modules local Network = require(ReplicatedStorage.Common.Network) local Skills = require(ReplicatedStorage.Common.Skills) local Combat = require(ReplicatedStorage.Common.Combat) -- Data Setup local PlayerData = {} local GameStore = DataStoreService:GetDataStore("GlobalData_" .. DATA_VERSION) -- Main Controller local GameController = {} GameController.__index = GameController function GameController.new() local self = setmetatable({}, GameController) self.ActiveSessions = {} return self end function GameController:Init() print("Initializing Game Framework...") Players.PlayerAdded:Connect(function(player) self:OnPlayerJoin(player) end) Players.PlayerRemoving:Connect(function(player) self:OnPlayerLeave(player) end) task.spawn(function() while true do task.wait(SAVE_INTERVAL) self:AutoSave() end end) end function GameController:OnPlayerJoin(player) local success, data = self:LoadData(player) if success then self.ActiveSessions[player.UserId] = data self:SetupCharacter(player) else player:Kick("Failed to load data. Please rejoin.") end end function GameController:LoadData(player) local retries = 0 local success, data repeat retries += 1 success, data = pcall(function() return GameStore:GetAsync(tostring(player.UserId)) end) if not success then task.wait(1) end until success or retries >= MAX_RETRIES if not data then data = { Level = 1, XP = 0, Gold = 100, Inventory = {}, LastLogin = os.time() } end return success, data end function GameController:SetupCharacter(player) player.CharacterAdded:Connect(function(char) local hum = char:WaitForChild("Humanoid") hum.WalkSpeed = 16 hum.JumpPower = 50 -- Custom physics implementation char.HumanoidRootPart.Touched:Connect(function(hit) self:HandleCollision(player, hit) end) end) end function GameController:HandleCollision(player, hit) if hit:GetAttribute("IsHazard") then local char = player.Character if char then local hum = char:FindFirstChild("Humanoid") if hum then hum:TakeDamage(10) -- Knockback effect local hrp = char:FindFirstChild("HumanoidRootPart") if hrp then local velocity = (hrp.Position - hit.Position).Unit * 50 hrp.AssemblyLinearVelocity = Vector3.new(velocity.X, 20, velocity.Z) end end end end end -- Render Loop for Client Effects RunService.Heartbeat:Connect(function(dt) for _, player in ipairs(Players:GetPlayers()) do if player.Character then -- Update UI markers -- Calculate precise positions -- Handle client-side visuals end end end) return GameController -- Additional Utility Functions local function Lerp(a, b, t) return a + (b - a) * t end local function GetClosestPlayer(position, maxDistance) local closest = nil local minDist = maxDistance or math.huge for _, player in ipairs(Players:GetPlayers()) do if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then local dist = (player.Character.HumanoidRootPart.Position - position).Magnitude if dist < minDist then minDist=dist closest=player end end end return closest end
-- Services local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local DataStoreService = game:GetService("DataStoreService") local Debris = game:GetService("Debris") local TweenService = game:GetService("TweenService") local PhysicsService = game:GetService("PhysicsService") -- Constants local DATA_VERSION = "v1.0.5" local SAVE_INTERVAL = 60 local MAX_RETRIES = 3 -- Modules local Network = require(ReplicatedStorage.Common.Network) local Skills = require(ReplicatedStorage.Common.Skills) local Combat = require(ReplicatedStorage.Common.Combat) -- Data Setup local PlayerData = {} local GameStore = DataStoreService:GetDataStore("GlobalData_" .. DATA_VERSION) -- Main Controller local GameController = {} GameController.__index = GameController function GameController.new() local self = setmetatable({}, GameController) self.ActiveSessions = {} return self end function GameController:Init() print("Initializing Game Framework...") Players.PlayerAdded:Connect(function(player) self:OnPlayerJoin(player) end) Players.PlayerRemoving:Connect(function(player) self:OnPlayerLeave(player) end) task.spawn(function() while true do task.wait(SAVE_INTERVAL) self:AutoSave() end end) end function GameController:OnPlayerJoin(player) local success, data = self:LoadData(player) if success then self.ActiveSessions[player.UserId] = data self:SetupCharacter(player) else player:Kick("Failed to load data. Please rejoin.") end end function GameController:LoadData(player) local retries = 0 local success, data repeat retries += 1 success, data = pcall(function() return GameStore:GetAsync(tostring(player.UserId)) end) if not success then task.wait(1) end until success or retries >= MAX_RETRIES if not data then data = { Level = 1, XP = 0, Gold = 100, Inventory = {}, LastLogin = os.time() } end return success, data end function GameController:SetupCharacter(player) player.CharacterAdded:Connect(function(char) local hum = char:WaitForChild("Humanoid") hum.WalkSpeed = 16 hum.JumpPower = 50 -- Custom physics implementation char.HumanoidRootPart.Touched:Connect(function(hit) self:HandleCollision(player, hit) end) end) end function GameController:HandleCollision(player, hit) if hit:GetAttribute("IsHazard") then local char = player.Character if char then local hum = char:FindFirstChild("Humanoid") if hum then hum:TakeDamage(10) -- Knockback effect local hrp = char:FindFirstChild("HumanoidRootPart") if hrp then local velocity = (hrp.Position - hit.Position).Unit * 50 hrp.AssemblyLinearVelocity = Vector3.new(velocity.X, 20, velocity.Z) end end end end end -- Render Loop for Client Effects RunService.Heartbeat:Connect(function(dt) for _, player in ipairs(Players:GetPlayers()) do if player.Character then -- Update UI markers -- Calculate precise positions -- Handle client-side visuals end end end) return GameController -- Additional Utility Functions local function Lerp(a, b, t) return a + (b - a) * t end local function GetClosestPlayer(position, maxDistance) local closest = nil local minDist = maxDistance or math.huge for _, player in ipairs(Players:GetPlayers()) do if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then local dist = (player.Character.HumanoidRootPart.Position - position).Magnitude if dist < minDist then minDist=dist closest=player end end end return closest end

CHIX

Roblox Developer with 3 years of experience specializing in high-performance scripting and environment building. Operating in EST. Dedicated to meeting expectations with a focus on timely delivery and iterative refinement.

avatar.exe
$
DataStore Service Physics & Vector Math UI/UX Implementation Environment Design Optimization
Custom Leaderboard System

Global Architecture & Data Persistence

A robust leaderboard ecosystem featuring cross-server synchronization and an automated reward engine. Built using high-concurrency DataStore methods to ensure 100% data integrity and player retention.

Advanced Movement System

Kinetic Locomotion Engine

Advanced physics-based movement system including momentum-mapped sliding and dashing. Optimized for low-latency responsiveness and fluid player transitions across all PC hardware.

Studded Tsunami Map

Thematic Spatial Design

A conceptual level design utilizing a "Coral-Core" aesthetic. Optimized for performance with strategic player-plot placement, VIP-exclusive zones, and integrated hiding spot logic.

Physics-Based Landmine

Vector-Force Physics Simulation

Custom explosion system utilizing Ragdoll and Fling physics. Uses precise vector math to simulate realistic character displacement and environmental interaction upon impact.

Copied to clipboard!